-
Notifications
You must be signed in to change notification settings - Fork 159
/
text.cabal
365 lines (331 loc) · 10.4 KB
/
text.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
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
cabal-version: 2.2
name: text
version: 2.1.2
homepage: https://github.com/haskell/text
bug-reports: https://github.com/haskell/text/issues
synopsis: An efficient packed Unicode text type.
description:
.
An efficient packed, immutable Unicode text type (both strict and
lazy).
.
The 'Text' type represents Unicode character strings, in a time and
space-efficient manner. This package provides text processing
capabilities that are optimized for performance critical use, both
in terms of large data quantities and high speed.
.
The 'Text' type provides character-encoding, type-safe case
conversion via whole-string case conversion functions (see "Data.Text").
It also provides a range of functions for converting 'Text' values to
and from 'ByteStrings', using several standard encodings
(see "Data.Text.Encoding").
.
Efficient locale-sensitive support for text IO is also supported
(see "Data.Text.IO").
.
These modules are intended to be imported qualified, to avoid name
clashes with Prelude functions, e.g.
.
> import qualified Data.Text as T
.
== ICU Support
.
To use an extended and very rich family of functions for working
with Unicode text (including normalization, regular expressions,
non-standard encodings, text breaking, and locales), see
the [text-icu package](https://hackage.haskell.org/package/text-icu)
based on the well-respected and liberally
licensed [ICU library](http://site.icu-project.org/).
license: BSD-2-Clause
license-file: LICENSE
author: Bryan O'Sullivan <[email protected]>
maintainer: Haskell Text Team <[email protected]>, Core Libraries Committee
copyright: 2009-2011 Bryan O'Sullivan, 2008-2009 Tom Harper, 2021 Andrew Lelechenko
category: Data, Text
build-type: Simple
tested-with:
GHC == 8.4.4
GHC == 8.6.5
GHC == 8.8.4
GHC == 8.10.7
GHC == 9.0.2
GHC == 9.2.8
GHC == 9.4.8
GHC == 9.6.4
GHC == 9.8.2
GHC == 9.10.1
extra-source-files:
-- scripts/CaseFolding.txt
-- scripts/SpecialCasing.txt
README.md
changelog.md
scripts/*.hs
simdutf/LICENSE-APACHE
simdutf/LICENSE-MIT
simdutf/simdutf.h
tests/literal-rule-test.sh
tests/LiteralRuleTest.hs
flag developer
description: operate in developer mode
default: False
manual: True
flag simdutf
description: use simdutf library, causes Data.Text.Internal.Validate.Simd to be exposed
default: True
manual: True
flag pure-haskell
description: Don't use text's standard C routines
NB: This feature is not fully implemented. Several C routines are still in
use.
When this flag is true, text will use pure Haskell variants of the
routines. This is not recommended except for use with GHC's JavaScript
backend.
This flag also disables simdutf.
default: False
manual: True
flag ExtendedBenchmarks
description: Runs extra benchmarks which can be very slow.
default: False
manual: True
library
if arch(javascript) || flag(pure-haskell)
cpp-options: -DPURE_HASKELL
else
c-sources: cbits/is_ascii.c
cbits/reverse.c
cbits/utils.c
if (arch(aarch64))
c-sources: cbits/aarch64/measure_off.c
else
c-sources: cbits/measure_off.c
hs-source-dirs: src
if flag(simdutf) && !(arch(javascript) || flag(pure-haskell))
exposed-modules: Data.Text.Internal.Validate.Simd
include-dirs: simdutf
cxx-sources: simdutf/simdutf.cpp
cbits/validate_utf8.cpp
cxx-options: -std=c++17
cpp-options: -DSIMDUTF
if impl(ghc >= 9.4)
build-depends: system-cxx-std-lib == 1.0
elif os(darwin) || os(freebsd)
extra-libraries: c++
elif os(openbsd)
extra-libraries: c++ c++abi pthread
elif os(windows)
-- GHC's Windows toolchain is based on clang/libc++ in GHC 9.4 and later
if impl(ghc < 9.3)
extra-libraries: stdc++
else
extra-libraries: c++ c++abi
elif arch(wasm32)
cpp-options: -DSIMDUTF_NO_THREADS
cxx-options: -fno-exceptions
extra-libraries: c++ c++abi
else
extra-libraries: stdc++
-- Certain version of GHC crash on Windows, when TemplateHaskell encounters C++.
-- https://gitlab.haskell.org/ghc/ghc/-/issues/19417
if flag(simdutf) && os(windows) && impl(ghc >= 8.8 && < 8.10.5 || == 9.0.1)
build-depends: base < 0
-- For GHC 8.2, 8.6.3 and 8.10.1 even TH + C crash Windows linker.
if os(windows) && impl(ghc >= 8.2 && < 8.4 || == 8.6.3 || == 8.10.1)
build-depends: base < 0
-- GHC 8.10 has linking issues (probably TH-related) on ARM.
if (arch(aarch64) || arch(arm)) && impl(ghc == 8.10.*)
build-depends: base < 0
-- Subword primitives in GHC 9.2.1 are broken on ARM platforms.
if (arch(aarch64) || arch(arm)) && impl(ghc == 9.2.1)
build-depends: base < 0
-- NetBSD + GHC 9.2.1 + TH + C++ does not work together.
-- https://gitlab.haskell.org/ghc/ghc/-/issues/22577
if flag(simdutf) && os(netbsd) && impl(ghc < 9.4)
build-depends: base < 0
exposed-modules:
Data.Text
Data.Text.Array
Data.Text.Encoding
Data.Text.Encoding.Error
Data.Text.Foreign
Data.Text.IO
Data.Text.IO.Utf8
Data.Text.Internal
Data.Text.Internal.ArrayUtils
Data.Text.Internal.Builder
Data.Text.Internal.Builder.Functions
Data.Text.Internal.Builder.Int.Digits
Data.Text.Internal.Builder.RealFloat.Functions
Data.Text.Internal.ByteStringCompat
Data.Text.Internal.PrimCompat
Data.Text.Internal.Encoding
Data.Text.Internal.Encoding.Fusion
Data.Text.Internal.Encoding.Fusion.Common
Data.Text.Internal.Encoding.Utf16
Data.Text.Internal.Encoding.Utf32
Data.Text.Internal.Encoding.Utf8
Data.Text.Internal.Fusion
Data.Text.Internal.Fusion.CaseMapping
Data.Text.Internal.Fusion.Common
Data.Text.Internal.Fusion.Size
Data.Text.Internal.Fusion.Types
Data.Text.Internal.IO
Data.Text.Internal.Lazy
Data.Text.Internal.Lazy.Encoding.Fusion
Data.Text.Internal.Lazy.Fusion
Data.Text.Internal.Lazy.Search
Data.Text.Internal.Private
Data.Text.Internal.Read
Data.Text.Internal.Search
Data.Text.Internal.StrictBuilder
Data.Text.Internal.Unsafe
Data.Text.Internal.Unsafe.Char
Data.Text.Internal.Validate
Data.Text.Internal.Validate.Native
Data.Text.Lazy
Data.Text.Lazy.Builder
Data.Text.Lazy.Builder.Int
Data.Text.Lazy.Builder.RealFloat
Data.Text.Lazy.Encoding
Data.Text.Lazy.IO
Data.Text.Lazy.Internal
Data.Text.Lazy.Read
Data.Text.Read
Data.Text.Unsafe
other-modules:
Data.Text.Show
Data.Text.Internal.Measure
Data.Text.Internal.Reverse
Data.Text.Internal.Transformation
Data.Text.Internal.IsAscii
build-depends:
array >= 0.3 && < 0.6,
base >= 4.11 && < 5,
binary >= 0.5 && < 0.9,
bytestring >= 0.10.4 && < 0.13,
deepseq >= 1.1 && < 1.6,
ghc-prim >= 0.2 && < 0.12,
template-haskell >= 2.5 && < 2.23
if impl(ghc < 9.4)
build-depends: data-array-byte >= 0.1 && < 0.2
ghc-options: -Wall -fwarn-tabs -funbox-strict-fields -O2
if flag(developer)
ghc-options: -fno-ignore-asserts
cpp-options: -DASSERTS
if impl(ghc >= 9.2.2)
ghc-options: -fcheck-prim-bounds
default-language: Haskell2010
default-extensions:
NondecreasingIndentation
other-extensions:
BangPatterns
CPP
DeriveDataTypeable
ExistentialQuantification
ForeignFunctionInterface
GeneralizedNewtypeDeriving
MagicHash
OverloadedStrings
Rank2Types
RankNTypes
RecordWildCards
Safe
ScopedTypeVariables
TemplateHaskellQuotes
Trustworthy
TypeFamilies
UnboxedTuples
UnliftedFFITypes
source-repository head
type: git
location: https://github.com/haskell/text
test-suite tests
type: exitcode-stdio-1.0
ghc-options:
-Wall -threaded -rtsopts -with-rtsopts=-N
hs-source-dirs: tests
main-is: Tests.hs
other-modules:
Tests.Lift
Tests.Properties
Tests.Properties.Basics
Tests.Properties.Builder
Tests.Properties.Folds
Tests.Properties.Instances
Tests.Properties.LowLevel
Tests.Properties.Read
Tests.Properties.Substrings
Tests.Properties.Text
Tests.Properties.Transcoding
Tests.Properties.Validate
Tests.QuickCheckUtils
Tests.RebindableSyntaxTest
Tests.Regressions
Tests.SlowFunctions
Tests.ShareEmpty
Tests.Utils
build-depends:
QuickCheck >= 2.12.6 && < 2.16,
base <5,
binary,
bytestring,
deepseq,
directory,
ghc-prim,
tasty,
tasty-hunit,
tasty-quickcheck,
template-haskell,
transformers,
text
if impl(ghc < 9.4)
build-depends: data-array-byte >= 0.1 && < 0.2
-- Plugin infrastructure does not work properly in 8.6.1, and
-- ghc-9.2.1 library depends on parsec, which causes a circular dependency.
if impl(ghc >= 8.2.1 && < 8.6 || >= 8.6.2 && < 9.2 || >= 9.2.2)
build-depends: tasty-inspection-testing
default-language: Haskell2010
default-extensions: NondecreasingIndentation
benchmark text-benchmarks
type: exitcode-stdio-1.0
ghc-options: -Wall -O2 -rtsopts "-with-rtsopts=-A32m"
if impl(ghc >= 8.6)
ghc-options: -fproc-alignment=64
if flag(ExtendedBenchmarks)
cpp-options: -DExtendedBenchmarks
build-depends: base,
bytestring >= 0.10.4,
containers,
deepseq,
directory,
filepath,
tasty-bench >= 0.2,
text,
transformers
hs-source-dirs: benchmarks/haskell
main-is: Benchmarks.hs
other-modules:
Benchmarks.Builder
Benchmarks.Concat
Benchmarks.DecodeUtf8
Benchmarks.EncodeUtf8
Benchmarks.Equality
Benchmarks.FileRead
Benchmarks.FileWrite
Benchmarks.FoldLines
Benchmarks.Micro
Benchmarks.Multilang
Benchmarks.Programs.BigTable
Benchmarks.Programs.Cut
Benchmarks.Programs.Fold
Benchmarks.Programs.Sort
Benchmarks.Programs.StripTags
Benchmarks.Programs.Throughput
Benchmarks.Pure
Benchmarks.ReadNumbers
Benchmarks.Replace
Benchmarks.Search
Benchmarks.Stream
Benchmarks.WordFrequencies
default-language: Haskell2010
default-extensions: NondecreasingIndentation
other-extensions: DeriveGeneric