-
Notifications
You must be signed in to change notification settings - Fork 0
/
dupIO.cabal
173 lines (156 loc) · 4.13 KB
/
dupIO.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
cabal-version: 3.0
name: dupIO
version: 0.1.0
synopsis: Duplicate any closure
description: This is a revival of the old @ghc-dup@ package, and provides
a way to make shallow copies of closures.
license: BSD-3-Clause
license-file: LICENSE
author: Edsko de Vries
Joachim Breitner
Douglas Wilson
maintainer: edsko@well-typed.com
copyright: Well-Typed LLP
category: Development
build-type: Simple
extra-doc-files: CHANGELOG.md
tested-with: GHC ==8.6.5 ||
==8.8.4 ||
==8.10.7 ||
==9.0.2 ||
==9.2.8 ||
==9.4.7 ||
==9.6.2 ||
==9.8.2 ||
==9.10.1
source-repository head
type: git
location: https://github.com/well-typed/dupIO
common lang
ghc-options:
-Wall
build-depends:
base >= 4.12 && < 4.21
default-language:
Haskell2010
default-extensions:
BangPatterns
DeriveAnyClass
DerivingStrategies
EmptyCase
GeneralizedNewtypeDeriving
KindSignatures
LambdaCase
NamedFieldPuns
NumericUnderscores
ScopedTypeVariables
TypeApplications
--------------------------------------------------------------------------------
-- Main library
--------------------------------------------------------------------------------
library
import:
lang
exposed-modules:
Data.Dup
other-modules:
Data.Dup.Internal
hs-source-dirs:
src
c-sources:
cbits/dup-prim.cmm
cbits/dup.c
build-depends:
ghc-prim >= 0.5 && < 0.12
--------------------------------------------------------------------------------
-- Testing
--------------------------------------------------------------------------------
flag use-debug-RTS
manual: True
default: False
test-suite test-dupIO
import:
lang
type:
exitcode-stdio-1.0
hs-source-dirs:
test
main-is:
Main.hs
other-modules:
Test.Average
Test.Dup.Conduit.Closed
Test.Dup.Conduit.Sink
Test.Dup.Conduit.Source
Test.DupIO.Conduit.Closed
Test.DupIO.Conduit.Sink
Test.DupIO.Conduit.Source
Test.DupIO.Conduit.Source.Bidirectional
Test.DupIO.Conduit.Source.IO
Test.DupIO.UnsafeInterleaveIO
Test.DupIO.UnsafePerformIO
Test.Sanity.TestSetup
Test.Util
Test.Util.Conduit.Bidirectional
Test.Util.Conduit.Closed
Test.Util.Conduit.Sink
Test.Util.Conduit.Source
Test.Util.Conduit.Source.Bidirectional
Test.Util.Conduit.Source.IO
Test.Util.TestSetup
build-depends:
, dupIO
, ghc-prim
, tasty
, tasty-hunit
default-extensions:
UnboxedTuples
MagicHash
ghc-options:
-with-rtsopts "-T"
-fno-full-laziness
-fno-state-hack
-threaded
-rtsopts
if flag(use-debug-RTS)
ghc-options:
-with-rtsopts "-T -DS"
-debug
if impl(ghc >= 9.2.0)
ghc-options:
-fdistinct-constructor-tables
-finfo-table-map
--------------------------------------------------------------------------------
-- Demos
--
-- NOTE: HLS seems to get confused when @hs-source-dirs@ is defined in a common
-- stanza, so we repeat it for each demo.
--------------------------------------------------------------------------------
flag build-demos
manual: True
default: False
common demo
import: lang
build-depends: dupIO
if !flag(build-demos)
buildable: False
executable demo-averageIO
import: demo
hs-source-dirs: demo
main-is: AverageIO.hs
executable demo-averageST
import: demo
hs-source-dirs: demo
main-is: AverageST.hs
executable demo-conduit
import: demo
hs-source-dirs: demo
main-is: Conduit.hs
executable demo-conduit-ref
import: demo
hs-source-dirs: demo
main-is: ConduitRef.hs
executable demo-leak-in-io
import: demo
hs-source-dirs: demo
main-is: LeakInIO.hs