-
Notifications
You must be signed in to change notification settings - Fork 32
/
filepath.cabal
184 lines (162 loc) · 4.83 KB
/
filepath.cabal
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
cabal-version: 2.2
name: filepath
version: 1.5.4.0
-- NOTE: Don't forget to update ./changelog.md
license: BSD-3-Clause
license-file: LICENSE
author: Neil Mitchell <[email protected]>
maintainer: Julian Ospald <[email protected]>
copyright: Neil Mitchell 2005-2020, Julian Ospald 2021-2022
bug-reports: https://github.com/haskell/filepath/issues
homepage:
https://github.com/haskell/filepath/blob/master/README.md
category: System
build-type: Simple
synopsis: Library for manipulating FilePaths in a cross platform way.
tested-with:
GHC ==8.6.5
|| ==8.8.4
|| ==8.10.7
|| ==9.0.2
|| ==9.2.8
|| ==9.4.8
|| ==9.6.3
|| ==9.8.1
description:
This package provides functionality for manipulating @FilePath@ values, and is shipped with <https://www.haskell.org/ghc/ GHC>. It provides two variants for filepaths:
.
1. legacy filepaths: @type FilePath = String@
.
2. operating system abstracted filepaths (@OsPath@): internally unpinned @ShortByteString@ (platform-dependent encoding)
.
It is recommended to use @OsPath@ when possible, because it is more correct.
.
For each variant there are three main modules:
.
* "System.FilePath.Posix" / "System.OsPath.Posix" manipulates POSIX\/Linux style @FilePath@ values (with @\/@ as the path separator).
.
* "System.FilePath.Windows" / "System.OsPath.Windows" manipulates Windows style @FilePath@ values (with either @\\@ or @\/@ as the path separator, and deals with drives).
.
* "System.FilePath" / "System.OsPath" for dealing with current platform-specific filepaths
.
For more powerful string manipulation of @OsPath@, you can use the <https://hackage.haskell.org/package/os-string os-string package> (@OsPath@ is a type synonym for @OsString@).
.
An introduction into the new API can be found in this
<https://hasufell.github.io/posts/2022-06-29-fixing-haskell-filepaths.html blog post>.
Code examples for the new API can be found <https://github.com/hasufell/filepath-examples here>.
extra-source-files:
Generate.hs
Makefile
System/FilePath/Internal.hs
System/OsPath/Common.hs
extra-doc-files:
changelog.md
HACKING.md
README.md
flag cpphs
description: Use cpphs (fixes haddock source links)
default: False
manual: True
source-repository head
type: git
location: https://github.com/haskell/filepath
library
exposed-modules:
System.FilePath
System.FilePath.Posix
System.FilePath.Windows
System.OsPath
System.OsPath.Encoding
System.OsPath.Internal
System.OsPath.Posix
System.OsPath.Posix.Internal
System.OsPath.Types
System.OsPath.Windows
System.OsPath.Windows.Internal
other-extensions:
CPP
PatternGuards
if impl(ghc >=7.2)
other-extensions: Safe
default-language: Haskell2010
build-depends:
, base >=4.12.0.0 && <4.22
, bytestring >=0.11.3.0
, deepseq
, exceptions
, template-haskell
, os-string >=2.0.1
ghc-options: -Wall
if flag(cpphs)
ghc-options: -pgmPcpphs -optP--cpp
build-tool-depends: cpphs:cpphs -any
test-suite filepath-tests
type: exitcode-stdio-1.0
main-is: Test.hs
hs-source-dirs: tests tests/filepath-tests
other-modules:
TestGen
TestUtil
build-depends:
, base
, bytestring >=0.11.3.0
, filepath
, os-string >=2.0.1
, tasty
, tasty-quickcheck
default-language: Haskell2010
ghc-options: -Wall
test-suite filepath-equivalent-tests
default-language: Haskell2010
ghc-options: -Wall
type: exitcode-stdio-1.0
main-is: TestEquiv.hs
hs-source-dirs: tests tests/filepath-equivalent-tests
other-modules:
Legacy.System.FilePath
Legacy.System.FilePath.Posix
Legacy.System.FilePath.Windows
TestUtil
Gen
build-depends:
, base
, bytestring >=0.11.3.0
, filepath
, generic-random
, generic-deriving
, os-string >=2.0.1
, tasty
, tasty-quickcheck
test-suite abstract-filepath
default-language: Haskell2010
ghc-options: -Wall
type: exitcode-stdio-1.0
main-is: Test.hs
hs-source-dirs: tests tests/abstract-filepath
other-modules:
Arbitrary
OsPathSpec
TestUtil
build-depends:
, base
, bytestring >=0.11.3.0
, deepseq
, filepath
, os-string >=2.0.1
, quickcheck-classes-base ^>=0.6.2
, tasty
, tasty-quickcheck
benchmark bench-filepath
default-language: Haskell2010
ghc-options: -Wall
type: exitcode-stdio-1.0
main-is: BenchFilePath.hs
hs-source-dirs: bench
build-depends:
, base
, bytestring >=0.11.3.0
, deepseq
, filepath
, os-string >=2.0.1
, tasty-bench
ghc-options: -with-rtsopts=-A32m