on master help sign in
refactor compilation options into common stanzas
3336bb1Harendra Kumar
streamly.cabal+106−400
@@ -1,3 +1,4 @@
1+cabal-version: 2.2
1name: streamly
2name: streamly
2version: 0.6.1
3version: 0.6.1
3synopsis: Beautiful Streaming, Concurrent and Reactive Composition
4synopsis: Beautiful Streaming, Concurrent and Reactive Composition
@@ -86,7 +87,7 @@ description:
86
87
87homepage: https://github.com/composewell/streamly
88homepage: https://github.com/composewell/streamly
88bug-reports: https://github.com/composewell/streamly/issues
89bug-reports: https://github.com/composewell/streamly/issues
89−license: BSD3
90+license: BSD-3-Clause
90license-file: LICENSE
91license-file: LICENSE
91tested-with: GHC==7.10.3
92tested-with: GHC==7.10.3
92 , GHC==8.0.2
93 , GHC==8.0.2
@@ -98,7 +99,6 @@ copyright: 2017 Harendra Kumar
98category: Control, Concurrency, Streaming, Reactivity
99category: Control, Concurrency, Streaming, Reactivity
99stability: Experimental
100stability: Experimental
100build-type: Configure
101build-type: Configure
101−cabal-version: >= 1.10
102
102
103extra-source-files:
103extra-source-files:
104 Changelog.md
104 Changelog.md
@@ -171,11 +171,81 @@ flag examples-sdl
171 manual: True
171 manual: True
172 default: False
172 default: False
173
173
174+-------------------------------------------------------------------------------
175+-- Common stanzas
176+-------------------------------------------------------------------------------
177+
178+common compile-options
179+ default-language: Haskell2010
180+ if flag(streamk)
181+ cpp-options: -DUSE_STREAMK_ONLY
182+
183+ if flag(no-fusion)
184+ cpp-options: -DDISABLE_FUSION
185+
186+ if flag(dev)
187+ cpp-options: -DDEVBUILD
188+
189+ ghc-options: -Wall
190+
191+ if flag(has-llvm)
192+ ghc-options: -fllvm
193+
194+ if flag(dev)
195+ ghc-options: -Wmissed-specialisations
196+ -Wall-missed-specialisations
197+ -fno-ignore-asserts
198+ if impl(ghc >= 8.0)
199+ ghc-options: -Wcompat
200+ -Wunrecognised-warning-flags
201+ -Widentities
202+ -Wincomplete-record-updates
203+ -Wincomplete-uni-patterns
204+ -Wredundant-constraints
205+ -Wnoncanonical-monad-instances
206+ -Wnoncanonical-monadfail-instances
207+
208+common optimization-options
209+ ghc-options: -O2
210+ -fspec-constr-recursive=10
211+ -fmax-worker-args=16
212+
213+common threading-options
214+ ghc-options: -threaded
215+ -with-rtsopts=-N
216+
217+-- We need optimization options here to optimize internal (non-inlined)
218+-- versions of functions. Also, we have some benchmarking inspection tests
219+-- part of the library when built with --benchmarks flag. Thos tests fail
220+-- if we do not use optimization options here. It was observed that due to
221+-- -O2 here some concurrent/nested benchmarks improved and others regressed.
222+-- We can investigate a bit more here why the regression occurred.
223+common lib-options
224+ import: compile-options, optimization-options
225+
226+-- Compilation for coverage builds on CI machines takes too long without -O0
227+-- XXX we should use coverage flag for that, -O0 may take too long to run tests
228+-- in general.
229+common test-options
230+ import: compile-options, threading-options
231+ ghc-options: -O0
232+ -fno-ignore-asserts
233+
234+-- Used by maxrate test, benchmarks and executables
235+common exe-options
236+ import: compile-options, optimization-options, threading-options
237+
238+-- Some benchmarks are threaded some are not
239+common bench-options
240+ import: compile-options, optimization-options
241+ ghc-options: -with-rtsopts "-T"
242+
174-------------------------------------------------------------------------------
243-------------------------------------------------------------------------------
175-- Library
244-- Library
176-------------------------------------------------------------------------------
245-------------------------------------------------------------------------------
177
246
178library
247library
248+ import: lib-options
179 js-sources: jsbits/clock.js
249 js-sources: jsbits/clock.js
180 include-dirs: src/Streamly/Time
250 include-dirs: src/Streamly/Time
181 , src/Streamly/Streams
251 , src/Streamly/Streams
@@ -260,42 +330,6 @@ library
260 , Streamly.Benchmark.FileIO.Array
330 , Streamly.Benchmark.FileIO.Array
261 , Streamly.Benchmark.FileIO.Stream
331 , Streamly.Benchmark.FileIO.Stream
262
332
263− default-language: Haskell2010
264− -- We need optimization options here to optimize internal (non-inlined)
265− -- versions of functions. Also, we have some benchmarking inspection tests
266− -- part of the library when built with --benchmarks flag. Thos tests fail
267− -- if we do not use optimization options here. It was observed that due to
268− -- -O2 here some concurrent/nested benchmarks improved and others regressed.
269− -- We can investigate a bit more here why the regression occurred.
270− ghc-options: -Wall
271− -O2
272− -fspec-constr-recursive=10
273− -fmax-worker-args=16
274−
275− if flag(has-llvm)
276− ghc-options: -fllvm
277−
278− if flag(streamk)
279− cpp-options: -DUSE_STREAMK_ONLY
280−
281− if flag(no-fusion)
282− cpp-options: -DDISABLE_FUSION
283−
284− if flag(dev)
285− cpp-options: -DDEVBUILD
286− ghc-options: -Wmissed-specialisations
287− -Wall-missed-specialisations
288− -fno-ignore-asserts
289− if impl(ghc >= 8.0)
290− ghc-options: -Wcompat
291− -Wunrecognised-warning-flags
292− -Widentities
293− -Wincomplete-record-updates
294− -Wincomplete-uni-patterns
295− -Wredundant-constraints
296− -Wnoncanonical-monad-instances
297− -Wnoncanonical-monadfail-instances
298−
299 build-depends: base >= 4.8 && < 5
333 build-depends: base >= 4.8 && < 5
300 , ghc-prim >= 0.2 && < 0.6
334 , ghc-prim >= 0.2 && < 0.6
301 , deepseq >= 1.4.1 && < 1.5
335 , deepseq >= 1.4.1 && < 1.5
@@ -328,27 +362,12 @@ library
328-- Test suites
362-- Test suites
329-------------------------------------------------------------------------------
363-------------------------------------------------------------------------------
330
364
331−-- Compilation for coverage builds on CI machines takes too long without -O0
332−
333test-suite test
365test-suite test
366+ import: test-options
334 type: exitcode-stdio-1.0
367 type: exitcode-stdio-1.0
335 main-is: Main.hs
368 main-is: Main.hs
336 js-sources: jsbits/clock.js
369 js-sources: jsbits/clock.js
337 hs-source-dirs: test
370 hs-source-dirs: test
338− ghc-options: -O0 -Wall -threaded -with-rtsopts=-N -fno-ignore-asserts
339− if flag(dev)
340− cpp-options: -DDEVBUILD
341− ghc-options: -Wmissed-specialisations
342− -Wall-missed-specialisations
343− if impl(ghc >= 8.0)
344− ghc-options: -Wcompat
345− -Wunrecognised-warning-flags
346− -Widentities
347− -Wincomplete-record-updates
348− -Wincomplete-uni-patterns
349− -Wredundant-constraints
350− -Wnoncanonical-monad-instances
351− -Wnoncanonical-monadfail-instances
352 build-depends:
371 build-depends:
353 streamly
372 streamly
354 , base >= 4.8 && < 5
373 , base >= 4.8 && < 5
@@ -360,23 +379,10 @@ test-suite test
360 default-language: Haskell2010
379 default-language: Haskell2010
361
380
362test-suite pure-streams-base
381test-suite pure-streams-base
382+ import: test-options
363 type: exitcode-stdio-1.0
383 type: exitcode-stdio-1.0
364 main-is: PureStreams.hs
384 main-is: PureStreams.hs
365 hs-source-dirs: test
385 hs-source-dirs: test
366− ghc-options: -Wall -threaded -with-rtsopts=-N -fno-ignore-asserts
367− if flag(dev)
368− cpp-options: -DDEVBUILD
369− ghc-options: -Wmissed-specialisations
370− -Wall-missed-specialisations
371− if impl(ghc >= 8.0)
372− ghc-options: -Wcompat
373− -Wunrecognised-warning-flags
374− -Widentities
375− -Wincomplete-record-updates
376− -Wincomplete-uni-patterns
377− -Wredundant-constraints
378− -Wnoncanonical-monad-instances
379− -Wnoncanonical-monadfail-instances
380 build-depends:
386 build-depends:
381 streamly
387 streamly
382 , base >= 4.8 && < 5
388 , base >= 4.8 && < 5
@@ -385,23 +391,10 @@ test-suite pure-streams-base
385
391
386-- test-suite pure-streams-streamly
392-- test-suite pure-streams-streamly
387-- type: exitcode-stdio-1.0
393-- type: exitcode-stdio-1.0
394+-- import: test-options
388-- main-is: PureStreams.hs
395-- main-is: PureStreams.hs
389-- hs-source-dirs: test
396-- hs-source-dirs: test
390-- cpp-options: -DUSE_STREAMLY_LIST
397-- cpp-options: -DUSE_STREAMLY_LIST
391−-- ghc-options: -O0 -Wall -threaded -with-rtsopts=-N -fno-ignore-asserts
392−-- if flag(dev)
393−-- cpp-options: -DDEVBUILD
394−-- ghc-options: -Wmissed-specialisations
395−-- -Wall-missed-specialisations
396−-- if impl(ghc >= 8.0)
397−-- ghc-options: -Wcompat
398−-- -Wunrecognised-warning-flags
399−-- -Widentities
400−-- -Wincomplete-record-updates
401−-- -Wincomplete-uni-patterns
402−-- -Wredundant-constraints
403−-- -Wnoncanonical-monad-instances
404−-- -Wnoncanonical-monadfail-instances
405-- build-depends:
398-- build-depends:
406-- streamly
399-- streamly
407-- , base >= 4.8 && < 5
400-- , base >= 4.8 && < 5
@@ -409,24 +402,11 @@ test-suite pure-streams-base
409-- default-language: Haskell2010
402-- default-language: Haskell2010
410
403
411test-suite properties
404test-suite properties
405+ import: test-options
412 type: exitcode-stdio-1.0
406 type: exitcode-stdio-1.0
413 main-is: Prop.hs
407 main-is: Prop.hs
414 js-sources: jsbits/clock.js
408 js-sources: jsbits/clock.js
415 hs-source-dirs: test
409 hs-source-dirs: test
416− ghc-options: -fno-ignore-asserts -Wall -O0 -threaded -with-rtsopts=-N
417− if flag(dev)
418− cpp-options: -DDEVBUILD
419− ghc-options: -Wmissed-specialisations
420− -Wall-missed-specialisations
421− if impl(ghc >= 8.0)
422− ghc-options: -Wcompat
423− -Wunrecognised-warning-flags
424− -Widentities
425− -Wincomplete-record-updates
426− -Wincomplete-uni-patterns
427− -Wredundant-constraints
428− -Wnoncanonical-monad-instances
429− -Wnoncanonical-monadfail-instances
430 build-depends:
410 build-depends:
431 streamly
411 streamly
432 , base >= 4.8 && < 5
412 , base >= 4.8 && < 5
@@ -438,24 +418,11 @@ test-suite properties
438 default-language: Haskell2010
418 default-language: Haskell2010
439
419
440test-suite array-test
420test-suite array-test
421+ import: test-options
441 type: exitcode-stdio-1.0
422 type: exitcode-stdio-1.0
442 main-is: Arrays.hs
423 main-is: Arrays.hs
443 js-sources: jsbits/clock.js
424 js-sources: jsbits/clock.js
444 hs-source-dirs: test
425 hs-source-dirs: test
445− ghc-options: -fno-ignore-asserts -Wall -O0 -threaded -with-rtsopts=-N
446− if flag(dev)
447− cpp-options: -DDEVBUILD
448− ghc-options: -Wmissed-specialisations
449− -Wall-missed-specialisations
450− if impl(ghc >= 8.0)
451− ghc-options: -Wcompat
452− -Wunrecognised-warning-flags
453− -Widentities
454− -Wincomplete-record-updates
455− -Wincomplete-uni-patterns
456− -Wredundant-constraints
457− -Wnoncanonical-monad-instances
458− -Wnoncanonical-monadfail-instances
459 build-depends:
426 build-depends:
460 streamly
427 streamly
461 , base >= 4.8 && < 5
428 , base >= 4.8 && < 5
@@ -467,24 +434,11 @@ test-suite array-test
467 default-language: Haskell2010
434 default-language: Haskell2010
468
435
469test-suite string-test
436test-suite string-test
437+ import: test-options
470 type: exitcode-stdio-1.0
438 type: exitcode-stdio-1.0
471 main-is: String.hs
439 main-is: String.hs
472 js-sources: jsbits/clock.js
440 js-sources: jsbits/clock.js
473 hs-source-dirs: test
441 hs-source-dirs: test
474− ghc-options: -fno-ignore-asserts -Wall -O0 -threaded -with-rtsopts=-N
475− if flag(dev)
476− cpp-options: -DDEVBUILD
477− ghc-options: -Wmissed-specialisations
478− -Wall-missed-specialisations
479− if impl(ghc >= 8.0)
480− ghc-options: -Wcompat
481− -Wunrecognised-warning-flags
482− -Widentities
483− -Wincomplete-record-updates
484− -Wincomplete-uni-patterns
485− -Wredundant-constraints
486− -Wnoncanonical-monad-instances
487− -Wnoncanonical-monadfail-instances
488 build-depends:
442 build-depends:
489 streamly
443 streamly
490 , base >= 4.8 && < 5
444 , base >= 4.8 && < 5
@@ -496,12 +450,12 @@ test-suite string-test
496 default-language: Haskell2010
450 default-language: Haskell2010
497
451
498test-suite maxrate
452test-suite maxrate
453+ import: exe-options
499 type: exitcode-stdio-1.0
454 type: exitcode-stdio-1.0
500 default-language: Haskell2010
455 default-language: Haskell2010
501 main-is: MaxRate.hs
456 main-is: MaxRate.hs
502 js-sources: jsbits/clock.js
457 js-sources: jsbits/clock.js
503 hs-source-dirs: test
458 hs-source-dirs: test
504− ghc-options: -fno-ignore-asserts -O2 -Wall -threaded -with-rtsopts=-N
505 if flag(dev)
459 if flag(dev)
506 buildable: True
460 buildable: True
507 build-Depends:
461 build-Depends:
@@ -514,43 +468,43 @@ test-suite maxrate
514 buildable: False
468 buildable: False
515
469
516test-suite loops
470test-suite loops
471+ import: test-options
517 type: exitcode-stdio-1.0
472 type: exitcode-stdio-1.0
518 default-language: Haskell2010
473 default-language: Haskell2010
519 main-is: loops.hs
474 main-is: loops.hs
520 hs-source-dirs: test
475 hs-source-dirs: test
521− ghc-options: -fno-ignore-asserts -O2 -Wall -threaded -with-rtsopts=-N
522 build-Depends:
476 build-Depends:
523 streamly
477 streamly
524 , base >= 4.8 && < 5
478 , base >= 4.8 && < 5
525
479
526test-suite nested-loops
480test-suite nested-loops
481+ import: test-options
527 type: exitcode-stdio-1.0
482 type: exitcode-stdio-1.0
528 default-language: Haskell2010
483 default-language: Haskell2010
529 main-is: nested-loops.hs
484 main-is: nested-loops.hs
530 hs-source-dirs: test
485 hs-source-dirs: test
531− ghc-options: -fno-ignore-asserts -O2 -Wall -threaded -with-rtsopts=-N
532 build-Depends:
486 build-Depends:
533 streamly
487 streamly
534 , base >= 4.8 && < 5
488 , base >= 4.8 && < 5
535 , random >= 1.0.0 && < 2
489 , random >= 1.0.0 && < 2
536
490
537test-suite parallel-loops
491test-suite parallel-loops
492+ import: test-options
538 type: exitcode-stdio-1.0
493 type: exitcode-stdio-1.0
539 default-language: Haskell2010
494 default-language: Haskell2010
540 main-is: parallel-loops.hs
495 main-is: parallel-loops.hs
541 hs-source-dirs: test
496 hs-source-dirs: test
542− ghc-options: -fno-ignore-asserts -O2 -Wall -threaded -with-rtsopts=-N
543 build-Depends:
497 build-Depends:
544 streamly
498 streamly
545 , base >= 4.8 && < 5
499 , base >= 4.8 && < 5
546 , random >= 1.0.0 && < 2
500 , random >= 1.0.0 && < 2
547
501
548test-suite inspection
502test-suite inspection
503+ import: test-options
549 type: exitcode-stdio-1.0
504 type: exitcode-stdio-1.0
550 default-language: Haskell2010
505 default-language: Haskell2010
551 main-is: inspection.hs
506 main-is: inspection.hs
552 hs-source-dirs: test
507 hs-source-dirs: test
553− ghc-options: -fno-ignore-asserts -O2 -Wall -threaded -with-rtsopts=-N
554 build-Depends:
508 build-Depends:
555 streamly
509 streamly
556 , base >= 4.8 && < 5
510 , base >= 4.8 && < 5
@@ -566,33 +520,11 @@ test-suite inspection
566-------------------------------------------------------------------------------
520-------------------------------------------------------------------------------
567
521
568benchmark linear
522benchmark linear
523+ import: bench-options
569 type: exitcode-stdio-1.0
524 type: exitcode-stdio-1.0
570 hs-source-dirs: benchmark
525 hs-source-dirs: benchmark
571 main-is: Linear.hs
526 main-is: Linear.hs
572 other-modules: LinearOps
527 other-modules: LinearOps
573− default-language: Haskell2010
574− ghc-options: -O2
575− -fspec-constr-recursive=10
576− -fmax-worker-args=16
577− -Wall
578− -with-rtsopts "-T"
579−
580− if flag(has-llvm)
581− ghc-options: -fllvm
582−
583− if flag(dev)
584− ghc-options: -Wmissed-specialisations
585− -Wall-missed-specialisations
586− -fno-ignore-asserts
587− if impl(ghc >= 8.0)
588− ghc-options: -Wcompat
589− -Wunrecognised-warning-flags
590− -Widentities
591− -Wincomplete-record-updates
592− -Wincomplete-uni-patterns
593− -Wredundant-constraints
594− -Wnoncanonical-monad-instances
595− -Wnoncanonical-monadfail-instances
596 build-depends:
528 build-depends:
597 streamly
529 streamly
598 , base >= 4.8 && < 5
530 , base >= 4.8 && < 5
@@ -604,34 +536,12 @@ benchmark linear
604 transformers >= 0.4 && < 0.6
536 transformers >= 0.4 && < 0.6
605
537
606benchmark linear-async
538benchmark linear-async
539+ import: bench-options
540+ cpp-options: -DLINEAR_ASYNC
607 type: exitcode-stdio-1.0
541 type: exitcode-stdio-1.0
608 hs-source-dirs: benchmark
542 hs-source-dirs: benchmark
609 main-is: LinearAsync.hs
543 main-is: LinearAsync.hs
610 other-modules: LinearOps
544 other-modules: LinearOps
611− default-language: Haskell2010
612− ghc-options: -O2
613− -fspec-constr-recursive=10
614− -fmax-worker-args=16
615− -Wall
616− -with-rtsopts "-T"
617−
618− if flag(has-llvm)
619− ghc-options: -fllvm
620−
621− cpp-options: -DLINEAR_ASYNC
622− if flag(dev)
623− ghc-options: -Wmissed-specialisations
624− -Wall-missed-specialisations
625− -fno-ignore-asserts
626− if impl(ghc >= 8.0)
627− ghc-options: -Wcompat
628− -Wunrecognised-warning-flags
629− -Widentities
630− -Wincomplete-record-updates
631− -Wincomplete-uni-patterns
632− -Wredundant-constraints
633− -Wnoncanonical-monad-instances
634− -Wnoncanonical-monadfail-instances
635 build-depends:
545 build-depends:
636 streamly
546 streamly
637 , base >= 4.8 && < 5
547 , base >= 4.8 && < 5
@@ -643,33 +553,11 @@ benchmark linear-async
643 transformers >= 0.4 && < 0.6
553 transformers >= 0.4 && < 0.6
644
554
645benchmark linear-rate
555benchmark linear-rate
556+ import: bench-options
646 type: exitcode-stdio-1.0
557 type: exitcode-stdio-1.0
647 hs-source-dirs: benchmark
558 hs-source-dirs: benchmark
648 main-is: LinearRate.hs
559 main-is: LinearRate.hs
649 other-modules: LinearOps
560 other-modules: LinearOps
650− default-language: Haskell2010
651− ghc-options: -O2
652− -fspec-constr-recursive=10
653− -fmax-worker-args=16
654− -Wall
655− -with-rtsopts "-T"
656−
657− if flag(has-llvm)
658− ghc-options: -fllvm
659−
660− if flag(dev)
661− ghc-options: -Wmissed-specialisations
662− -Wall-missed-specialisations
663− -fno-ignore-asserts
664− if impl(ghc >= 8.0)
665− ghc-options: -Wcompat
666− -Wunrecognised-warning-flags
667− -Widentities
668− -Wincomplete-record-updates
669− -Wincomplete-uni-patterns
670− -Wredundant-constraints
671− -Wnoncanonical-monad-instances
672− -Wnoncanonical-monadfail-instances
673 build-depends:
561 build-depends:
674 streamly
562 streamly
675 , base >= 4.8 && < 5
563 , base >= 4.8 && < 5
@@ -681,34 +569,11 @@ benchmark linear-rate
681 transformers >= 0.4 && < 0.6
569 transformers >= 0.4 && < 0.6
682
570
683benchmark nested
571benchmark nested
572+ import: bench-options
684 type: exitcode-stdio-1.0
573 type: exitcode-stdio-1.0
685 hs-source-dirs: benchmark
574 hs-source-dirs: benchmark
686 main-is: Nested.hs
575 main-is: Nested.hs
687 other-modules: NestedOps
576 other-modules: NestedOps
688− default-language: Haskell2010
689− ghc-options: -O2
690− -fspec-constr-recursive=10
691− -fmax-worker-args=16
692− -Wall
693− -with-rtsopts "-T"
694−
695− if flag(has-llvm)
696− ghc-options: -fllvm
697−
698− if flag(dev)
699− cpp-options: -DDEVBUILD
700− ghc-options: -Wmissed-specialisations
701− -Wall-missed-specialisations
702− -fno-ignore-asserts
703− if impl(ghc >= 8.0)
704− ghc-options: -Wcompat
705− -Wunrecognised-warning-flags
706− -Widentities
707− -Wincomplete-record-updates
708− -Wincomplete-uni-patterns
709− -Wredundant-constraints
710− -Wnoncanonical-monad-instances
711− -Wnoncanonical-monadfail-instances
712 build-depends:
577 build-depends:
713 streamly
578 streamly
714 , base >= 4.8 && < 5
579 , base >= 4.8 && < 5
@@ -720,34 +585,11 @@ benchmark nested
720 transformers >= 0.4 && < 0.6
585 transformers >= 0.4 && < 0.6
721
586
722benchmark array
587benchmark array
588+ import: bench-options
723 type: exitcode-stdio-1.0
589 type: exitcode-stdio-1.0
724 hs-source-dirs: benchmark
590 hs-source-dirs: benchmark
725 main-is: Array.hs
591 main-is: Array.hs
726 other-modules: ArrayOps
592 other-modules: ArrayOps
727− default-language: Haskell2010
728− ghc-options: -O2
729− -fspec-constr-recursive=10
730− -fmax-worker-args=16
731− -Wall
732− -with-rtsopts "-T"
733−
734− if flag(has-llvm)
735− ghc-options: -fllvm
736−
737− if flag(dev)
738− cpp-options: -DDEVBUILD
739− ghc-options: -Wmissed-specialisations
740− -Wall-missed-specialisations
741− -fno-ignore-asserts
742− if impl(ghc >= 8.0)
743− ghc-options: -Wcompat
744− -Wunrecognised-warning-flags
745− -Widentities
746− -Wincomplete-record-updates
747− -Wincomplete-uni-patterns
748− -Wredundant-constraints
749− -Wnoncanonical-monad-instances
750− -Wnoncanonical-monadfail-instances
751 build-depends:
593 build-depends:
752 streamly
594 streamly
753 , base >= 4.8 && < 5
595 , base >= 4.8 && < 5
@@ -759,33 +601,10 @@ benchmark array
759 transformers >= 0.4 && < 0.6
601 transformers >= 0.4 && < 0.6
760
602
761benchmark fileio
603benchmark fileio
604+ import: bench-options
762 type: exitcode-stdio-1.0
605 type: exitcode-stdio-1.0
763 hs-source-dirs: benchmark
606 hs-source-dirs: benchmark
764 main-is: FileIO.hs
607 main-is: FileIO.hs
765− default-language: Haskell2010
766− ghc-options: -O2
767− -fspec-constr-recursive=10
768− -fmax-worker-args=16
769− -Wall
770− -with-rtsopts "-T"
771−
772− if flag(has-llvm)
773− ghc-options: -fllvm
774−
775− if flag(dev)
776− cpp-options: -DDEVBUILD
777− ghc-options: -Wmissed-specialisations
778− -Wall-missed-specialisations
779− -fno-ignore-asserts
780− if impl(ghc >= 8.0)
781− ghc-options: -Wcompat
782− -Wunrecognised-warning-flags
783− -Widentities
784− -Wincomplete-record-updates
785− -Wincomplete-uni-patterns
786− -Wredundant-constraints
787− -Wnoncanonical-monad-instances
788− -Wnoncanonical-monadfail-instances
789 if flag(benchmark)
608 if flag(benchmark)
790 buildable: True
609 buildable: True
791 build-depends:
610 build-depends:
@@ -799,33 +618,10 @@ benchmark fileio
799 buildable: False
618 buildable: False
800
619
801benchmark concurrent
620benchmark concurrent
621+ import: bench-options
802 type: exitcode-stdio-1.0
622 type: exitcode-stdio-1.0
803 hs-source-dirs: benchmark
623 hs-source-dirs: benchmark
804 main-is: Concurrent.hs
624 main-is: Concurrent.hs
805− default-language: Haskell2010
806− ghc-options: -O2
807− -fspec-constr-recursive=10
808− -fmax-worker-args=16
809− -Wall
810− -with-rtsopts "-T"
811−
812− if flag(has-llvm)
813− ghc-options: -fllvm
814−
815− if flag(dev)
816− cpp-options: -DDEVBUILD
817− ghc-options: -Wmissed-specialisations
818− -Wall-missed-specialisations
819− -fno-ignore-asserts
820− if impl(ghc >= 8.0)
821− ghc-options: -Wcompat
822− -Wunrecognised-warning-flags
823− -Widentities
824− -Wincomplete-record-updates
825− -Wincomplete-uni-patterns
826− -Wredundant-constraints
827− -Wnoncanonical-monad-instances
828− -Wnoncanonical-monadfail-instances
829 if flag(dev)
625 if flag(dev)
830 buildable: True
626 buildable: True
831 build-depends:
627 build-depends:
@@ -843,6 +639,7 @@ benchmark concurrent
843-- way to use unexposed modules from the library.
639-- way to use unexposed modules from the library.
844
640
845benchmark base
641benchmark base
642+ import: bench-options
846 type: exitcode-stdio-1.0
643 type: exitcode-stdio-1.0
847 include-dirs: src/Streamly/Time
644 include-dirs: src/Streamly/Time
848 , src/Streamly/Streams
645 , src/Streamly/Streams
@@ -866,30 +663,6 @@ benchmark base
866 , StreamDOps
663 , StreamDOps
867 , StreamKOps
664 , StreamKOps
868
665
869− default-language: Haskell2010
870− ghc-options: -O2
871− -fspec-constr-recursive=10
872− -fmax-worker-args=16
873− -Wall
874− -with-rtsopts "-T"
875−
876− if flag(has-llvm)
877− ghc-options: -fllvm
878−
879− if flag(dev)
880− ghc-options: -Wmissed-specialisations
881− -Wall-missed-specialisations
882− -fno-ignore-asserts
883− if impl(ghc >= 8.0)
884− ghc-options: -Wcompat
885− -Wunrecognised-warning-flags
886− -Widentities
887− -Wincomplete-record-updates
888− -Wincomplete-uni-patterns
889− -Wredundant-constraints
890− -Wnoncanonical-monad-instances
891− -Wnoncanonical-monadfail-instances
892−
893 if flag(dev)
666 if flag(dev)
894 buildable: True
667 buildable: True
895 build-depends:
668 build-depends:
@@ -919,6 +692,7 @@ benchmark base
919 buildable: False
692 buildable: False
920
693
921executable nano-bench
694executable nano-bench
695+ import: bench-options
922 hs-source-dirs: benchmark, src
696 hs-source-dirs: benchmark, src
923 include-dirs: src/Streamly/Time
697 include-dirs: src/Streamly/Time
924 , src/Streamly/Streams
698 , src/Streamly/Streams
@@ -936,16 +710,6 @@ executable nano-bench
936 , Streamly.Streams.StreamD.Type
710 , Streamly.Streams.StreamD.Type
937 , Streamly.FileSystem.IOVec
711 , Streamly.FileSystem.IOVec
938 , Streamly.Streams.StreamD
712 , Streamly.Streams.StreamD
939− default-language: Haskell2010
940− ghc-options: -O2
941− -fspec-constr-recursive=10
942− -fmax-worker-args=16
943− -Wall
944− -with-rtsopts "-T"
945−
946− if flag(has-llvm)
947− ghc-options: -fllvm
948−
949 if flag(dev)
713 if flag(dev)
950 buildable: True
714 buildable: True
951 build-depends:
715 build-depends:
@@ -970,18 +734,10 @@ executable nano-bench
970 buildable: False
734 buildable: False
971
735
972executable adaptive
736executable adaptive
737+ import: bench-options
973 hs-source-dirs: benchmark
738 hs-source-dirs: benchmark
974 main-is: Adaptive.hs
739 main-is: Adaptive.hs
975 default-language: Haskell2010
740 default-language: Haskell2010
976− ghc-options: -O2
977− -fspec-constr-recursive=10
978− -fmax-worker-args=16
979− -Wall
980− -with-rtsopts "-T"
981−
982− if flag(has-llvm)
983− ghc-options: -fllvm
984−
985 if flag(dev)
741 if flag(dev)
986 buildable: True
742 buildable: True
987 build-depends:
743 build-depends:
@@ -994,6 +750,7 @@ executable adaptive
994
750
995executable chart
751executable chart
996 default-language: Haskell2010
752 default-language: Haskell2010
753+ ghc-options: -Wall
997 hs-source-dirs: benchmark
754 hs-source-dirs: benchmark
998 main-is: Chart.hs
755 main-is: Chart.hs
999 if flag(dev) && !flag(no-charts) && !impl(ghcjs)
756 if flag(dev) && !flag(no-charts) && !impl(ghcjs)
@@ -1011,14 +768,9 @@ executable chart
1011-------------------------------------------------------------------------------
768-------------------------------------------------------------------------------
1012
769
1013executable SearchQuery
770executable SearchQuery
1014− default-language: Haskell2010
771+ import: exe-options
1015 main-is: SearchQuery.hs
772 main-is: SearchQuery.hs
1016 hs-source-dirs: examples
773 hs-source-dirs: examples
1017− ghc-options: -O2
1018− -fspec-constr-recursive=10
1019− -fmax-worker-args=16
1020− -Wall
1021− -with-rtsopts "-T"
1022 if (flag(examples) || flag(examples-sdl)) && !impl(ghcjs)
774 if (flag(examples) || flag(examples-sdl)) && !impl(ghcjs)
1023 buildable: True
775 buildable: True
1024 build-Depends:
776 build-Depends:
@@ -1029,14 +781,9 @@ executable SearchQuery
1029 buildable: False
781 buildable: False
1030
782
1031executable ListDir
783executable ListDir
1032− default-language: Haskell2010
784+ import: exe-options
1033 main-is: ListDir.hs
785 main-is: ListDir.hs
1034 hs-source-dirs: examples
786 hs-source-dirs: examples
1035− ghc-options: -O2
1036− -fspec-constr-recursive=10
1037− -fmax-worker-args=16
1038− -Wall
1039− -with-rtsopts "-T"
1040 if flag(examples) || flag(examples-sdl)
787 if flag(examples) || flag(examples-sdl)
1041 buildable: True
788 buildable: True
1042 build-Depends:
789 build-Depends:
@@ -1050,14 +797,9 @@ executable ListDir
1050 buildable: False
797 buildable: False
1051
798
1052executable MergeSort
799executable MergeSort
1053− default-language: Haskell2010
800+ import: exe-options
1054 main-is: MergeSort.hs
801 main-is: MergeSort.hs
1055 hs-source-dirs: examples
802 hs-source-dirs: examples
1056− ghc-options: -O2
1057− -fspec-constr-recursive=10
1058− -fmax-worker-args=16
1059− -Wall
1060− -with-rtsopts "-T"
1061 if flag(examples) || flag(examples-sdl)
803 if flag(examples) || flag(examples-sdl)
1062 buildable: True
804 buildable: True
1063 build-Depends:
805 build-Depends:
@@ -1068,14 +810,9 @@ executable MergeSort
1068 buildable: False
810 buildable: False
1069
811
1070executable AcidRain
812executable AcidRain
1071− default-language: Haskell2010
813+ import: exe-options
1072 main-is: AcidRain.hs
814 main-is: AcidRain.hs
1073 hs-source-dirs: examples
815 hs-source-dirs: examples
1074− ghc-options: -O2
1075− -fspec-constr-recursive=10
1076− -fmax-worker-args=16
1077− -Wall
1078− -with-rtsopts "-T"
1079 if flag(examples) || flag(examples-sdl)
816 if flag(examples) || flag(examples-sdl)
1080 buildable: True
817 buildable: True
1081 build-Depends:
818 build-Depends:
@@ -1090,14 +827,9 @@ executable AcidRain
1090 buildable: False
827 buildable: False
1091
828
1092executable CirclingSquare
829executable CirclingSquare
1093− default-language: Haskell2010
830+ import: exe-options
1094 main-is: CirclingSquare.hs
831 main-is: CirclingSquare.hs
1095 hs-source-dirs: examples
832 hs-source-dirs: examples
1096− ghc-options: -O2
1097− -fspec-constr-recursive=10
1098− -fmax-worker-args=16
1099− -Wall
1100− -with-rtsopts "-T"
1101 if flag(examples-sdl)
833 if flag(examples-sdl)
1102 buildable: True
834 buildable: True
1103 build-Depends:
835 build-Depends:
@@ -1108,10 +840,9 @@ executable CirclingSquare
1108 buildable: False
840 buildable: False
1109
841
1110executable ControlFlow
842executable ControlFlow
1111− default-language: Haskell2010
843+ import: exe-options
1112 main-is: ControlFlow.hs
844 main-is: ControlFlow.hs
1113 hs-source-dirs: examples
845 hs-source-dirs: examples
1114− ghc-options: -Wall
1115 if flag(examples) || flag(examples-sdl)
846 if flag(examples) || flag(examples-sdl)
1116 buildable: True
847 buildable: True
1117 build-Depends:
848 build-Depends:
@@ -1127,14 +858,9 @@ executable ControlFlow
1127 buildable: False
858 buildable: False
1128
859
1129executable HandleIO
860executable HandleIO
1130− default-language: Haskell2010
861+ import: exe-options
1131 main-is: HandleIO.hs
862 main-is: HandleIO.hs
1132 hs-source-dirs: examples
863 hs-source-dirs: examples
1133− ghc-options: -O2
1134− -fspec-constr-recursive=10
1135− -fmax-worker-args=16
1136− -Wall
1137− -with-rtsopts "-T"
1138 if flag(examples) || flag(examples-sdl)
864 if flag(examples) || flag(examples-sdl)
1139 buildable: True
865 buildable: True
1140 build-Depends:
866 build-Depends:
@@ -1144,14 +870,9 @@ executable HandleIO
1144 buildable: False
870 buildable: False
1145
871
1146executable FileIOExamples
872executable FileIOExamples
1147− default-language: Haskell2010
873+ import: exe-options
1148 main-is: FileIOExamples.hs
874 main-is: FileIOExamples.hs
1149 hs-source-dirs: examples
875 hs-source-dirs: examples
1150− ghc-options: -O2
1151− -fspec-constr-recursive=10
1152− -fmax-worker-args=16
1153− -Wall
1154− -with-rtsopts "-T"
1155 if flag(examples) || flag(examples-sdl)
876 if flag(examples) || flag(examples-sdl)
1156 buildable: False
877 buildable: False
1157 build-Depends:
878 build-Depends:
@@ -1161,14 +882,9 @@ executable FileIOExamples
1161 buildable: False
882 buildable: False
1162
883
1163executable EchoServer
884executable EchoServer
1164− default-language: Haskell2010
885+ import: exe-options
1165 main-is: EchoServer.hs
886 main-is: EchoServer.hs
1166 hs-source-dirs: examples
887 hs-source-dirs: examples
1167− ghc-options: -O2
1168− -fspec-constr-recursive=10
1169− -fmax-worker-args=16
1170− -Wall
1171− -with-rtsopts "-T"
1172 if (flag(examples) || flag(examples-sdl)) && !impl(ghcjs)
888 if (flag(examples) || flag(examples-sdl)) && !impl(ghcjs)
1173 buildable: True
889 buildable: True
1174 build-Depends:
890 build-Depends:
@@ -1178,14 +894,9 @@ executable EchoServer
1178 buildable: False
894 buildable: False
1179
895
1180executable FileSinkServer
896executable FileSinkServer
1181− default-language: Haskell2010
897+ import: exe-options
1182 main-is: FileSinkServer.hs
898 main-is: FileSinkServer.hs
1183 hs-source-dirs: examples
899 hs-source-dirs: examples
1184− ghc-options: -O2
1185− -fspec-constr-recursive=10
1186− -fmax-worker-args=16
1187− -Wall
1188− -with-rtsopts "-T"
1189 if (flag(examples) || flag(examples-sdl)) && !impl(ghcjs)
900 if (flag(examples) || flag(examples-sdl)) && !impl(ghcjs)
1190 buildable: True
901 buildable: True
1191 build-Depends:
902 build-Depends:
@@ -1195,14 +906,9 @@ executable FileSinkServer
1195 buildable: False
906 buildable: False
1196
907
1197executable FromFileClient
908executable FromFileClient
1198− default-language: Haskell2010
909+ import: exe-options
1199 main-is: FromFileClient.hs
910 main-is: FromFileClient.hs
1200 hs-source-dirs: examples
911 hs-source-dirs: examples
1201− ghc-options: -O2
1202− -fspec-constr-recursive=10
1203− -fmax-worker-args=16
1204− -Wall
1205− -with-rtsopts "-T"
1206 if (flag(examples) || flag(examples-sdl)) && !impl(ghcjs)
912 if (flag(examples) || flag(examples-sdl)) && !impl(ghcjs)
1207 buildable: True
913 buildable: True
1208 build-Depends:
914 build-Depends: