Repository navigation
Expand file tree
/
Copy pathtext-show.cabal
More file actions
468 lines (421 loc) · 19.5 KB
/
Copy pathtext-show.cabal
File metadata and controls
468 lines (421 loc) · 19.5 KB
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
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
name: text-show
version: 3.4.1.1
synopsis: Efficient conversion of values into Text
description: @text-show@ offers a replacement for the @Show@ typeclass intended
for use with @Text@ instead of @String@s. This package was created
in the spirit of
@<http://hackage.haskell.org/package/bytestring-show bytestring-show>@.
.
At the moment, @text-show@ provides instances for most data
types in the @<http://hackage.haskell.org/package/array array>@,
@<http://hackage.haskell.org/package/base base>@,
@<http://hackage.haskell.org/package/bytestring bytestring>@, and
@<http://hackage.haskell.org/package/text text>@ packages.
Therefore, much of the source code for @text-show@ consists of
borrowed code from those packages in order to ensure that the
behaviors of @Show@ and @TextShow@ coincide.
.
For most uses, simply importing "TextShow"
will suffice:
.
@
module Main where
.
import TextShow
.
main :: IO ()
main = printT (Just \"Hello, World!\")
@
.
If you desire it, there are also monomorphic versions of the @showb@
function available in the submodules of "TextShow". See the
<https://github.com/RyanGlScott/text-show/wiki/Naming-conventions naming conventions>
page for more information.
.
Support for automatically deriving @TextShow@ instances can be found
in the "TextShow.TH" and "TextShow.Generic" modules.
homepage: https://github.com/RyanGlScott/text-show
bug-reports: https://github.com/RyanGlScott/text-show/issues
license: BSD3
license-file: LICENSE
author: Ryan Scott
maintainer: Ryan Scott <ryan.gl.scott@gmail.com>
stability: Provisional
copyright: (C) 2014-2016 Ryan Scott
category: Text
build-type: Simple
tested-with: GHC == 7.0.4
, GHC == 7.2.2
, GHC == 7.4.2
, GHC == 7.6.3
, GHC == 7.8.4
, GHC == 7.10.3
, GHC == 8.0.1
extra-source-files: CHANGELOG.md, README.md, include/*.h
cabal-version: >=1.10
source-repository head
type: git
location: https://github.com/RyanGlScott/text-show
flag developer
description: Operate in developer mode (allows for faster recompilation of tests)
default: False
manual: True
flag base-4-9
description: Use base-4.9 or later.
default: True
flag template-haskell-2-11
description: Use template-haskell-2.11.0.0 or later.
default: True
flag new-functor-classes
description: Use a version of transformers or transformers-compat with a
modern-style Data.Functor.Classes module. This flag cannot be
used when building with transformers-0.4, since it comes with
a different version of Data.Functor.Classes.
default: True
library
exposed-modules: TextShow
TextShow.Control.Applicative
TextShow.Control.Concurrent
TextShow.Control.Exception
TextShow.Control.Monad.ST
TextShow.Data.Array
TextShow.Data.Bool
TextShow.Data.ByteString
TextShow.Data.Char
TextShow.Data.Complex
TextShow.Data.Data
TextShow.Data.Dynamic
TextShow.Data.Either
TextShow.Data.Fixed
TextShow.Data.Floating
TextShow.Data.Functor.Compose
TextShow.Data.Functor.Identity
TextShow.Data.Functor.Product
TextShow.Data.Functor.Sum
TextShow.Debug.Trace
TextShow.Debug.Trace.Generic
TextShow.Debug.Trace.TH
TextShow.Generic
TextShow.Data.Integral
TextShow.Data.List
TextShow.Data.List.NonEmpty
TextShow.Data.Maybe
TextShow.Data.Monoid
TextShow.Data.Ord
TextShow.Data.Proxy
TextShow.Data.Ratio
TextShow.Data.Semigroup
TextShow.Data.Text
TextShow.Data.Tuple
TextShow.Data.Typeable
TextShow.Data.Version
TextShow.Data.Void
TextShow.Foreign.C.Types
TextShow.Foreign.Ptr
TextShow.Functions
TextShow.GHC.Generics
TextShow.Numeric.Natural
TextShow.System.Exit
TextShow.System.IO
TextShow.System.Posix.Types
TextShow.Text.Read
TextShow.TH
-- Only exports functions if using Windows
TextShow.GHC.Conc.Windows
-- Only exports functions if base >= 4.4
TextShow.GHC.Fingerprint
-- Only exports functions if base >= 4.4 and not using Windows
TextShow.GHC.Event
-- Only exports functions if base >= 4.5
TextShow.GHC.Stats
-- Only exports functions if base >= 4.6
TextShow.GHC.TypeLits
-- Only exports functions if base >= 4.7
TextShow.Data.Type.Coercion
TextShow.Data.Type.Equality
-- Only exports functions if base >= 4.7 && < 4.8
TextShow.Data.OldTypeable
-- Only exports functions if base >= 4.8
TextShow.GHC.RTS.Flags
TextShow.GHC.StaticPtr
-- Only exports functions if base >= 4.8.1
TextShow.GHC.Stack
other-modules: TextShow.Classes
TextShow.Data.Typeable.Utils
TextShow.FromStringTextShow
TextShow.Instances
TextShow.Options
TextShow.TH.Internal
TextShow.TH.Names
TextShow.Utils
build-depends: array >= 0.3 && < 0.6
, base-compat >= 0.8.1 && < 1
, bifunctors >= 5.1 && < 6
, bytestring >= 0.9 && < 0.11
, bytestring-builder
, containers >= 0.1 && < 0.6
, contravariant >= 0.5 && < 2
, generic-deriving >= 1.11 && < 2
, ghc-prim
, integer-gmp
, nats >= 0.1 && < 2
, semigroups >= 0.17 && < 1
, tagged >= 0.4.4 && < 1
, text >= 0.11.1 && < 1.3
, th-lift >= 0.7.6 && < 1
, void >= 0.5 && < 1
if flag(base-4-9)
build-depends: base >= 4.9 && < 5
cpp-options: "-DNEW_FUNCTOR_CLASSES"
else
build-depends: base >= 4.3 && < 4.9
if flag(template-haskell-2-11)
build-depends: template-haskell >= 2.11 && < 2.12
, ghc-boot-th
else
build-depends: template-haskell >= 2.5 && < 2.11
if flag(new-functor-classes)
build-depends: transformers (>= 0.2.1 && < 0.4) || (>= 0.5 && < 0.6)
, transformers-compat >= 0.5 && < 1
cpp-options: "-DNEW_FUNCTOR_CLASSES"
else
build-depends: transformers == 0.4.*
hs-source-dirs: src
default-language: Haskell2010
ghc-options: -Wall
include-dirs: include
includes: inline.h
, utils.h
test-suite spec
type: exitcode-stdio-1.0
main-is: Spec.hs
other-modules: Derived.DataFamilies
Derived.DatatypeContexts
Derived.ExistentialQuantification
Derived.Infix
Derived.MagicHash
Derived.PolyKinds
Derived.RankNTypes
Derived.Records
Derived.TypeSynonyms
Instances.Control.Concurrent
Instances.Control.Exception
Instances.Control.Monad.ST
Instances.Data.ByteString
Instances.Data.Char
Instances.Data.Data
Instances.Data.Dynamic
Instances.Data.Floating
Instances.Data.Functor.Compose
Instances.Data.Functor.Product
Instances.Data.Functor.Sum
Instances.Data.List.NonEmpty
Instances.Data.Ord
Instances.Data.Proxy
Instances.Data.Semigroup
Instances.Data.Text
Instances.Data.Tuple
Instances.Data.Typeable
Instances.Foreign.C.Types
Instances.Foreign.Ptr
Instances.FromStringTextShow
Instances.Generic
Instances.GHC.Generics
Instances.Options
Instances.System.Exit
Instances.System.IO
Instances.System.Posix.Types
Instances.Text.Read
Instances.Utils
-- Only exports instances if using Windows
Instances.GHC.Conc.Windows
-- Only exports instances if base >= 4.4
Instances.GHC.Fingerprint
-- Only exports instances if base >= 4.4 and not using Windows
Instances.GHC.Event
-- Only exports instances if base >= 4.5
Instances.GHC.Stats
-- Only exports instances if base >= 4.6
Instances.GHC.TypeLits
-- Only exports instances if base >= 4.7
Instances.Data.Type.Coercion
Instances.Data.Type.Equality
-- Only exports instances if base >= 4.7 && < 4.8
Instances.Data.OldTypeable
-- Only exports instances if base >= 4.8
Instances.GHC.RTS.Flags
Instances.GHC.StaticPtr
-- Only exports instances if base >= 4.9
Instances.GHC.Stack
Spec.BuilderSpec
Spec.Control.ApplicativeSpec
Spec.Control.ConcurrentSpec
Spec.Control.ExceptionSpec
Spec.Control.Monad.STSpec
Spec.Data.ArraySpec
Spec.Data.BoolSpec
Spec.Data.ByteStringSpec
Spec.Data.CharSpec
Spec.Data.ComplexSpec
Spec.Data.DataSpec
Spec.Data.DynamicSpec
Spec.Data.EitherSpec
Spec.Data.FixedSpec
Spec.Data.FloatingSpec
Spec.Data.Functor.ComposeSpec
Spec.Data.Functor.IdentitySpec
Spec.Data.Functor.ProductSpec
Spec.Data.Functor.SumSpec
Spec.Data.IntegralSpec
Spec.Data.ListSpec
Spec.Data.List.NonEmptySpec
Spec.Data.MaybeSpec
Spec.Data.MonoidSpec
Spec.Data.OrdSpec
Spec.Data.ProxySpec
Spec.Data.RatioSpec
Spec.Data.SemigroupSpec
Spec.Data.TextSpec
Spec.Data.TupleSpec
Spec.Data.TypeableSpec
Spec.Data.VersionSpec
Spec.Derived.DatatypeContextsSpec
Spec.Derived.ExistentialQuantificationSpec
Spec.Derived.InfixSpec
Spec.Derived.MagicHashSpec
Spec.Derived.PolyKindsSpec
Spec.Derived.RankNTypesSpec
Spec.Derived.RecordsSpec
Spec.Derived.TypeSynonymsSpec
Spec.Foreign.C.TypesSpec
Spec.Foreign.PtrSpec
Spec.FromStringTextShowSpec
Spec.FunctionsSpec
Spec.GenericSpec
Spec.GHC.GenericsSpec
Spec.Numeric.NaturalSpec
Spec.OptionsSpec
Spec.System.ExitSpec
Spec.System.IOSpec
Spec.System.Posix.TypesSpec
Spec.Text.ReadSpec
Spec.Utils
-- Only exports tests if using Windows
Spec.GHC.Conc.WindowsSpec
-- Only exports tests if base >= 4.4
Spec.GHC.FingerprintSpec
-- Only exports tests if base >= 4.4 and not using Windows
Spec.GHC.EventSpec
-- Only exports tests if base >= 4.5
Spec.GHC.StatsSpec
-- Only exports tests if template-haskell >= 2.7
Spec.Derived.DataFamiliesSpec
-- Only exports tests if base >= 4.6
Spec.GHC.TypeLitsSpec
-- Only exports tests if base >= 4.7
Spec.Data.Type.CoercionSpec
Spec.Data.Type.EqualitySpec
-- Only exports tests if base >= 4.7 && < 4.8
Spec.Data.OldTypeableSpec
-- Only exports tests if base >= 4.8
Spec.GHC.RTS.FlagsSpec
Spec.GHC.StaticPtrSpec
-- Only exports tests if base >= 4.9
Spec.GHC.StackSpec
build-depends: array >= 0.3 && < 0.6
, base-compat >= 0.8.2 && < 1
, base-orphans >= 0.5.2 && < 1
, bifunctors >= 5.1 && < 6
, bytestring >= 0.9 && < 0.11
, bytestring-builder
, containers >= 0.1 && < 0.6
, contravariant >= 0.5 && < 2
, deriving-compat >= 0.3.4 && < 1
, generic-deriving >= 1.11 && < 2
, ghc-prim
, hspec >= 2 && < 3
, integer-gmp
, nats >= 0.1 && < 2
, QuickCheck >= 2.9 && < 3
, quickcheck-instances >= 0.1 && < 0.4
, semigroups >= 0.17 && < 1
, tagged >= 0.8.3 && < 1
, text >= 0.11.1 && < 1.3
, th-lift >= 0.7.6 && < 1
, transformers-compat >= 0.5 && < 1
, void >= 0.5 && < 1
if flag(base-4-9)
build-depends: base >= 4.9 && < 5
cpp-options: "-DNEW_FUNCTOR_CLASSES"
else
build-depends: base >= 4.3 && < 4.9
if flag(template-haskell-2-11)
build-depends: template-haskell >= 2.11 && < 2.12
, ghc-boot-th
else
build-depends: template-haskell >= 2.5 && < 2.11
if flag(new-functor-classes)
build-depends: transformers (>= 0.2.1 && < 0.4) || (>= 0.5 && < 0.6)
cpp-options: "-DNEW_FUNCTOR_CLASSES"
else
build-depends: transformers == 0.4.*
if flag(developer)
hs-source-dirs: src
else
build-depends: text-show == 3.4.1.1
hs-source-dirs: tests
default-language: Haskell2010
ghc-options: -Wall -threaded -rtsopts
include-dirs: include
includes: generic.h
, overlap.h
, utils.h
benchmark bench
if impl(ghc < 7.4)
buildable: False
type: exitcode-stdio-1.0
main-is: Bench.hs
build-depends: array >= 0.3 && < 0.6
, base-compat >= 0.8.1 && < 1
, bifunctors >= 5.1 && < 6
, bytestring >= 0.9 && < 0.11
, bytestring-builder
, containers >= 0.1 && < 0.6
, contravariant >= 0.5 && < 2
, criterion >= 1.1.4 && < 2
, deepseq >= 1.3 && < 2
, generic-deriving >= 1.11 && < 2
, ghc-prim
, integer-gmp
, nats >= 0.1 && < 2
, semigroups >= 0.17 && < 1
, tagged >= 0.4.4 && < 1
, text >= 0.11.1 && < 1.3
, th-lift >= 0.7.6 && < 1
, void >= 0.5 && < 1
if flag(base-4-9)
build-depends: base >= 4.9 && < 5
cpp-options: "-DNEW_FUNCTOR_CLASSES"
else
build-depends: base >= 4.5 && < 4.9
if flag(template-haskell-2-11)
build-depends: template-haskell >= 2.11 && < 2.12
, ghc-boot-th
else
build-depends: template-haskell >= 2.5 && < 2.11
if flag(new-functor-classes)
build-depends: transformers (>= 0.2.1 && < 0.4) || (>= 0.5 && < 0.6)
, transformers-compat >= 0.5 && < 1
cpp-options: "-DNEW_FUNCTOR_CLASSES"
else
build-depends: transformers == 0.4.*
if flag(developer)
hs-source-dirs: src
else
build-depends: text-show == 3.4.1.1
hs-source-dirs: benchmarks
default-language: Haskell2010
ghc-options: -Wall
include-dirs: include
includes: inline.h
, utils.h