@@ -35,6 +35,7 @@ cabal-version: >= 1.10
3535extra-source-files:
3636 Changelog.md
3737 README.md
38+ bench.sh
3839 charts/comparative/AllOperationsataGlance.svg
3940 charts/comparative/ComposingPipelineStages.svg
4041 stack-7.10.yaml
@@ -59,6 +60,10 @@ flag examples-sdl
5960 manual: True
6061 default: False
6162
63+-------------------------------------------------------------------------------
64+-- Library
65+-------------------------------------------------------------------------------
66+
6267library
6368 hs-source-dirs: src
6469 other-modules: Streamly.Core
@@ -69,16 +74,6 @@ library
6974 , Streamly.Tutorial
7075 , Streamly
7176
72− if flag(examples) || flag(examples-sdl)
73− exposed-modules: Streamly.Examples
74− , Streamly.Examples.SearchEngineQuery
75− , Streamly.Examples.ListDirRecursive
76− , Streamly.Examples.MergeSortedStreams
77− , Streamly.Examples.AcidRainGame
78−
79− if flag(examples-sdl)
80− exposed-modules: Streamly.Examples.CirclingSquare
81−
8277 default-language: Haskell2010
8378 ghc-options: -Wall
8479
@@ -95,8 +90,6 @@ library
9590 -Wredundant-constraints
9691 -Wnoncanonical-monad-instances
9792 -Wnoncanonical-monadfail-instances
98− if flag(examples-sdl)
99− cpp-options: -DEXAMPLES_SDL
10093
10194 build-depends: base >= 4.8 && < 5
10295 , atomic-primops >= 0.8 && < 0.9
@@ -114,15 +107,9 @@ library
114107 build-depends:
115108 semigroups >= 0.18 && < 0.19
116109
117− if flag(examples) || flag(examples-sdl)
118− build-Depends:
119− http-conduit >= 2.2.2 && < 2.4
120− , path-io >= 0.1.0 && < 1.4
121− , random >= 1.0.0 && < 1.2
122−
123− if flag(examples-sdl)
124− build-Depends:
125− SDL >= 0.6.5 && < 0.7
110+-------------------------------------------------------------------------------
111+-- Test suites
112+-------------------------------------------------------------------------------
126113
127114test-suite test
128115 type: exitcode-stdio-1.0
@@ -175,6 +162,39 @@ test-suite properties
175162 , hspec >= 2.0 && < 3
176163 default-language: Haskell2010
177164
165+test-suite loops
166+ type: exitcode-stdio-1.0
167+ default-language: Haskell2010
168+ main-is: loops.hs
169+ hs-source-dirs: test
170+ build-Depends:
171+ streamly
172+ , base >= 4.8 && < 5
173+
174+test-suite nested-loops
175+ type: exitcode-stdio-1.0
176+ default-language: Haskell2010
177+ main-is: nested-loops.hs
178+ hs-source-dirs: test
179+ build-Depends:
180+ streamly
181+ , base >= 4.8 && < 5
182+ , random >= 1.0.0 && < 1.2
183+
184+test-suite parallel-loops
185+ type: exitcode-stdio-1.0
186+ default-language: Haskell2010
187+ main-is: parallel-loops.hs
188+ hs-source-dirs: test
189+ build-Depends:
190+ streamly
191+ , base >= 4.8 && < 5
192+ , random >= 1.0.0 && < 1.2
193+
194+-------------------------------------------------------------------------------
195+-- Benchmarks
196+-------------------------------------------------------------------------------
197+
178198benchmark linear
179199 type: exitcode-stdio-1.0
180200 hs-source-dirs: benchmark
@@ -229,10 +249,6 @@ benchmark nested
229249 , random >= 1.0 && < 2.0
230250 , gauge >= 0.2.1 && < 0.3
231251
232−-------------------------------------------------------------------------------
233−-- Examples
234−-------------------------------------------------------------------------------
235−
236252executable chart-linear
237253 default-language: Haskell2010
238254 hs-source-dirs: benchmark
@@ -259,37 +275,39 @@ executable chart-nested
259275 else
260276 buildable: False
261277
262−executable loops
278+-------------------------------------------------------------------------------
279+-- Examples
280+-------------------------------------------------------------------------------
281+
282+executable SearchQuery
263283 default-language: Haskell2010
264− main-is: loops.hs
284+ main-is: SearchQuery.hs
265285 hs-source-dirs: examples
266286 if flag(examples) || flag(examples-sdl)
267287 buildable: True
268288 build-Depends:
269289 streamly
270− , base >= 4.8 && < 5
290+ , base >= 4.8 && < 5
291+ , http-conduit >= 2.2.2 && < 2.4
271292 else
272293 buildable: False
273294
274−executable nested-loops
295+executable ListDir
275296 default-language: Haskell2010
276− main-is: nested-loops.hs
297+ main-is: ListDir.hs
277298 hs-source-dirs: examples
278299 if flag(examples) || flag(examples-sdl)
279300 buildable: True
280301 build-Depends:
281302 streamly
282− , base >= 4.8 && < 5
283− , random >= 1.0.0 && < 1.2
284− if impl(ghc < 8.0)
285− build-depends:
286− transformers >= 0.4 && < 0.6
303+ , base >= 4.8 && < 5
304+ , path-io >= 0.1.0 && < 1.4
287305 else
288306 buildable: False
289307
290−executable parallel-loops
308+executable MergeSort
291309 default-language: Haskell2010
292− main-is: parallel-loops.hs
310+ main-is: MergeSort.hs
293311 hs-source-dirs: examples
294312 if flag(examples) || flag(examples-sdl)
295313 buildable: True
@@ -297,8 +315,31 @@ executable parallel-loops
297315 streamly
298316 , base >= 4.8 && < 5
299317 , random >= 1.0.0 && < 1.2
300− if impl(ghc < 8.0)
301− build-depends:
302− transformers >= 0.4 && < 0.6
318+ else
319+ buildable: False
320+
321+executable AcidRain
322+ default-language: Haskell2010
323+ main-is: AcidRain.hs
324+ hs-source-dirs: examples
325+ if flag(examples) || flag(examples-sdl)
326+ buildable: True
327+ build-Depends:
328+ streamly
329+ , base >= 4.8 && < 5
330+ , mtl >= 2.2 && < 3
331+ else
332+ buildable: False
333+
334+executable CirclingSquare
335+ default-language: Haskell2010
336+ main-is: CirclingSquare.hs
337+ hs-source-dirs: examples
338+ if flag(examples-sdl)
339+ buildable: True
340+ build-Depends:
341+ streamly
342+ , base >= 4.8 && < 5
343+ , SDL >= 0.6.5 && < 0.7
303344 else
304345 buildable: False