on 43dda21 help sign in
streamly/core/streamly-core.cabal
346 lines 13 kB history raw
1cabal-version: 2.2
2name: streamly-core
3version: 0.1.0
4synopsis: Dataflow programming and declarative concurrency
5description: Basic streaming and arrays functionality of streamly.
7homepage: https://streamly.composewell.com
8bug-reports: https://github.com/composewell/streamly/issues
9author: Composewell Technologies
10maintainer: streamly@composewell.com
11copyright: 2017 Composewell Technologies
12category:
13 Streamly, Streaming, Dataflow, Pipes, List,
14 Logic, Non-determinism, Parsing, Array, Time
15stability: Stable
16build-type: Configure
18extra-source-files:
19 configure
20 configure.ac
22 -- This is duplicated
23 src/Streamly/Internal/Data/Stream/Instances.hs
24 src/Streamly/Internal/Data/Array/ArrayMacros.h
25 src/inline.hs
27 src/Streamly/Internal/Data/Time/Clock/config-clock.h
28 src/config.h.in
30extra-tmp-files:
31 config.log
32 config.status
33 autom4te.cache
34 src/config.h
36source-repository head
37 type: git
38 location: https://github.com/composewell/streamly
40flag debug
41 description: Debug build with asserts enabled
42 manual: True
43 default: False
45flag dev
46 description: Development build
47 manual: True
48 default: False
50flag has-llvm
51 description: Use llvm backend for code generation
52 manual: True
53 default: False
55flag no-fusion
56 description: Disable rewrite rules for stream fusion
57 manual: True
58 default: False
60flag streamk
61 description: Use CPS style streams when possible
62 manual: True
63 default: False
65flag use-c-malloc
66 description: Use C malloc instead of GHC malloc
67 manual: True
68 default: False
70flag opt
71 description: off=GHC default, on=-O2
72 manual: True
73 default: True
75flag limit-build-mem
76 description: Limits memory when building
77 manual: True
78 default: False
80flag use-unliftio
81 description: Use unliftio-core instead of monad-control
82 manual: True
83 default: False
85-------------------------------------------------------------------------------
86-- Common stanzas
87-------------------------------------------------------------------------------
89common compile-options
90 default-language: Haskell2010
92 if flag(streamk)
93 cpp-options: -DUSE_STREAMK_ONLY
95 if flag(no-fusion)
96 cpp-options: -DDISABLE_FUSION
98 if flag(dev)
99 cpp-options: -DDEVBUILD
101 if flag(use-c-malloc)
102 cpp-options: -DUSE_C_MALLOC
104 ghc-options: -Wall
105 -Wcompat
106 -Wunrecognised-warning-flags
107 -Widentities
108 -Wincomplete-record-updates
109 -Wincomplete-uni-patterns
110 -Wredundant-constraints
111 -Wnoncanonical-monad-instances
112 -Wmissing-export-lists
113 -Rghc-timing
115 if flag(has-llvm)
116 ghc-options: -fllvm
118 if flag(dev)
119 ghc-options: -Wmissed-specialisations
120 -Wall-missed-specialisations
122 if flag(limit-build-mem)
123 ghc-options: +RTS -M1000M -RTS
125 if flag(use-unliftio)
126 cpp-options: -DUSE_UNLIFTIO
128common default-extensions
129 default-extensions:
130 BangPatterns
131 CApiFFI
132 CPP
133 ConstraintKinds
134 DeriveDataTypeable
135 DeriveGeneric
136 DeriveTraversable
137 ExistentialQuantification
138 FlexibleContexts
139 FlexibleInstances
140 GeneralizedNewtypeDeriving
141 InstanceSigs
142 KindSignatures
143 LambdaCase
144 MagicHash
145 MultiParamTypeClasses
146 PatternSynonyms
147 RankNTypes
148 RecordWildCards
149 ScopedTypeVariables
150 TupleSections
151 TypeApplications
152 TypeFamilies
153 ViewPatterns
155 -- MonoLocalBinds, enabled by TypeFamilies, causes performance
156 -- regressions. Disable it. This must come after TypeFamilies,
157 -- otherwise TypeFamilies will enable it again.
158 NoMonoLocalBinds
160 -- UndecidableInstances -- Does not show any perf impact
161 -- UnboxedTuples -- interferes with (#.)
163common optimization-options
164 if flag(opt)
165 ghc-options: -O2
166 -fdicts-strict
167 -fspec-constr-recursive=16
168 -fmax-worker-args=16
170 -- For this to be effective it must come after the -O2 option
171 if flag(dev) || flag(debug) || !flag(opt)
172 ghc-options: -fno-ignore-asserts
174common threading-options
175 ghc-options: -threaded
176 -with-rtsopts=-N
178-- We need optimization options here to optimize internal (non-inlined)
179-- versions of functions. Also, we have some benchmarking inspection tests
180-- part of the library when built with --benchmarks flag. Thos tests fail
181-- if we do not use optimization options here. It was observed that due to
182-- -O2 here some concurrent/nested benchmarks improved and others regressed.
183-- We can investigate a bit more here why the regression occurred.
184common lib-options
185 import: compile-options, optimization-options, default-extensions
187-------------------------------------------------------------------------------
188-- Library
189-------------------------------------------------------------------------------
191library
192 import: lib-options
194 if impl(ghc >= 8.6)
195 default-extensions: QuantifiedConstraints
197 js-sources: jsbits/clock.js
199 include-dirs:
200 src
201 , src/Streamly/Internal/Data/Array
203 if os(windows)
204 c-sources: src/Streamly/Internal/Data/Time/Clock/Windows.c
206 if os(darwin)
207 include-dirs: src/Streamly/Internal
208 c-sources: src/Streamly/Internal/Data/Time/Clock/Darwin.c
210 hs-source-dirs: src
211 exposed-modules:
212 -- Internal modules, listed roughly in bottom up
213 -- dependency order To view dependency graph:
214 -- graphmod | dot -Tps > deps.ps
216 -- streamly-base
217 Streamly.Internal.BaseCompat
218 , Streamly.Internal.Control.Exception
219 , Streamly.Internal.Control.Monad
220 , Streamly.Internal.Control.ForkIO
221 , Streamly.Internal.Data.Cont
222 , Streamly.Internal.Foreign.Malloc
223 , Streamly.Internal.System.IO
224 , Streamly.Internal.Data.IsMap
226 -- streamly-strict-data
227 , Streamly.Internal.Data.Tuple.Strict
228 , Streamly.Internal.Data.Maybe.Strict
229 , Streamly.Internal.Data.Either.Strict
231 -- XXX Depends on monad-control or unliftio-core
232 , Streamly.Internal.Control.Concurrent
233 , Streamly.Internal.Control.ForkLifted
234 , Streamly.Internal.Data.IOFinalizer
236 -- streamly-time
237 , Streamly.Internal.Data.Time.TimeSpec
238 , Streamly.Internal.Data.Time.Units
239 , Streamly.Internal.Data.Time.Clock.Type
240 , Streamly.Internal.Data.Time.Clock
242 -- streamly-core-stream-types
243 , Streamly.Internal.Data.SVar.Type
244 , Streamly.Internal.Data.Stream.StreamK.Type
245 , Streamly.Internal.Data.Fold.Step
246 , Streamly.Internal.Data.Refold.Type
247 , Streamly.Internal.Data.Fold.Type
248 , Streamly.Internal.Data.Stream.StreamD.Step
249 , Streamly.Internal.Data.Stream.StreamD.Type
250 , Streamly.Internal.Data.Stream.StreamDK.Type
251 , Streamly.Internal.Data.Unfold.Type
252 , Streamly.Internal.Data.Producer.Type
253 , Streamly.Internal.Data.Producer
254 , Streamly.Internal.Data.Producer.Source
255 , Streamly.Internal.Data.Parser.ParserK.Type
256 , Streamly.Internal.Data.Parser.ParserD.Type
257 , Streamly.Internal.Data.Pipe.Type
259 -- streamly-core-array-types
260 -- Unboxed IORef
261 -- XXX Depends on primitive
262 , Streamly.Internal.Data.IORef.Prim
263 -- May depend on streamly-core-stream
264 , Streamly.Internal.Data.Array.Foreign.Mut.Type
265 , Streamly.Internal.Data.Array.Foreign.Mut
266 , Streamly.Internal.Data.Array.Foreign.Type
267 , Streamly.Internal.Data.Array.Mut.Type
269 -- streamly-core-streams
270 -- StreamD depends on streamly-array-types
271 , Streamly.Internal.Data.Stream.StreamD.Generate
272 , Streamly.Internal.Data.Stream.StreamD.Eliminate
273 , Streamly.Internal.Data.Stream.StreamD.Nesting
274 , Streamly.Internal.Data.Stream.StreamD.Transform
275 , Streamly.Internal.Data.Stream.StreamD.Exception
276 , Streamly.Internal.Data.Stream.StreamD.Lift
277 , Streamly.Internal.Data.Stream.StreamD
278 , Streamly.Internal.Data.Stream.StreamDK
279 , Streamly.Internal.Data.Stream.Common
281 , Streamly.Internal.Data.Parser.ParserD.Tee
282 , Streamly.Internal.Data.Parser.ParserD
284 -- streamly-core-data
285 , Streamly.Internal.Data.Unfold
286 , Streamly.Internal.Data.Unfold.Enumeration
287 , Streamly.Internal.Data.Fold.Tee
288 , Streamly.Internal.Data.Fold
289 , Streamly.Internal.Data.Fold.Window
290 , Streamly.Internal.Data.Parser
291 , Streamly.Internal.Data.Pipe
292 , Streamly.Internal.Data.Stream.Serial
293 , Streamly.Internal.Data.Stream.WSerial
294 , Streamly.Internal.Data.Stream.Zip
295 , Streamly.Internal.Data.List
297 -- streamly-core-data-arrays
298 -- XXX Depends on primitive
299 , Streamly.Internal.Data.Array
300 , Streamly.Internal.Data.Array.Foreign
301 , Streamly.Internal.Data.Array.Stream.Mut.Foreign
302 , Streamly.Internal.Data.Array.Stream.Fold.Foreign
304 -- Ring Arrays
305 , Streamly.Internal.Data.Ring.Foreign
306 -- XXX Depends on primitive
307 , Streamly.Internal.Data.Ring
309 -- Only used for benchmarks
310 , Streamly.Internal.Data.Stream.StreamK
312 -- streamly-core exposed modules
313 , Streamly.Data.Fold
314 , Streamly.Data.Fold.Tee
315 , Streamly.Data.Array.Foreign
317 build-depends:
318 -- Core libraries shipped with ghc, the min and max
319 -- constraints of these libraries should match with
320 -- the GHC versions we support. This is to make sure that
321 -- packages depending on the "ghc" package (packages
322 -- depending on doctest is a common example) can
323 -- depend on streamly.
324 base >= 4.9 && < 4.17
325 , containers >= 0.5 && < 0.7
326 , deepseq >= 1.4.1 && < 1.5
327 , directory >= 1.2.2 && < 1.4
328 , exceptions >= 0.8 && < 0.11
329 , ghc-prim >= 0.2 && < 0.9
330 , mtl >= 2.2 && < 2.3
331 , transformers >= 0.4 && < 0.7
332 , filepath >= 1.2.0.0 && < 1.5
334 , fusion-plugin-types >= 0.1 && < 0.2
336 -- XXX to be removed
337 , transformers-base >= 0.4 && < 0.5
338 , primitive >= 0.5.4 && < 0.8
339 , heaps >= 0.3 && < 0.5
340 , deque >= 0.4 && < 0.5
341 , hashable >= 1.3 && < 1.5
342 , unordered-containers >= 0.2 && < 0.3
343 if flag(use-unliftio)
344 build-depends: unliftio-core >= 0.2 && < 0.3
345 else
346 build-depends: monad-control >= 1.0 && < 1.1