on master help sign in
Combine test-core and bench-core flags to a single use-streamly-core flag (#1798)
commit0b4a300f1a334f57c82c4a3a9189055c1069b72b authorRanjeet Ranjan <ranjeetr@composewell.com> dateTue 23 Aug 2022, 11:47 (4 years ago) parent64e471b
2 files changed+60−60
benchmark/streamly-benchmarks.cabal+31−31 test/streamly-tests.cabal+29−29
benchmark/streamly-benchmarks.cabal+31−31
@@ -59,7 +59,7 @@ flag use-gauge
5959 manual: True
6060 default: False
6161
62−flag bench-core
62+flag use-streamly-core
6363 description: Benchmark only core package
6464 manual: True
6565 default: False
@@ -152,7 +152,7 @@ common bench-depends
152152 , filepath >= 1.4.1 && < 1.5
153153 , ghc-prim >= 0.4 && < 0.10
154154
155− if flag(bench-core)
155+ if flag(use-streamly-core)
156156 build-depends: streamly-core
157157 else
158158 build-depends: streamly
@@ -188,7 +188,7 @@ library
188188 hs-source-dirs: lib
189189 exposed-modules: Streamly.Benchmark.Common
190190 , Streamly.Benchmark.Common.Handle
191− if !flag(bench-core)
191+ if !flag(use-streamly-core)
192192 exposed-modules: Streamly.Benchmark.Prelude
193193
194194
@@ -235,7 +235,7 @@ benchmark Data.Stream
235235 if flag(use-prelude)
236236 other-modules:
237237 Stream.Split
238− if flag(bench-core) || impl(ghcjs)
238+ if flag(use-streamly-core) || impl(ghcjs)
239239 buildable: False
240240 else
241241 buildable: True
@@ -250,7 +250,7 @@ benchmark Prelude.WSerial
250250 type: exitcode-stdio-1.0
251251 hs-source-dirs: Streamly/Benchmark/Prelude
252252 main-is: WSerial.hs
253− if flag(bench-core) || impl(ghcjs)
253+ if flag(use-streamly-core) || impl(ghcjs)
254254 buildable: False
255255 else
256256 buildable: True
@@ -262,7 +262,7 @@ benchmark Prelude.Merge
262262 type: exitcode-stdio-1.0
263263 hs-source-dirs: Streamly/Benchmark/Prelude
264264 main-is: Merge.hs
265− if flag(bench-core) || impl(ghcjs)
265+ if flag(use-streamly-core) || impl(ghcjs)
266266 buildable: False
267267 else
268268 buildable: True
@@ -272,7 +272,7 @@ benchmark Prelude.ZipSerial
272272 type: exitcode-stdio-1.0
273273 hs-source-dirs: Streamly/Benchmark/Prelude
274274 main-is: ZipSerial.hs
275− if flag(bench-core) || impl(ghcjs)
275+ if flag(use-streamly-core) || impl(ghcjs)
276276 buildable: False
277277 else
278278 buildable: True
@@ -282,7 +282,7 @@ benchmark Prelude.ZipAsync
282282 type: exitcode-stdio-1.0
283283 hs-source-dirs: Streamly/Benchmark/Prelude
284284 main-is: ZipAsync.hs
285− if flag(bench-core) || impl(ghcjs)
285+ if flag(use-streamly-core) || impl(ghcjs)
286286 buildable: False
287287 else
288288 buildable: True
@@ -294,7 +294,7 @@ benchmark Prelude.Ahead
294294 type: exitcode-stdio-1.0
295295 hs-source-dirs: Streamly/Benchmark/Prelude
296296 main-is: Ahead.hs
297− if flag(bench-core) || impl(ghcjs)
297+ if flag(use-streamly-core) || impl(ghcjs)
298298 buildable: False
299299 else
300300 buildable: True
@@ -304,7 +304,7 @@ benchmark Prelude.Async
304304 type: exitcode-stdio-1.0
305305 hs-source-dirs: Streamly/Benchmark/Prelude
306306 main-is: Async.hs
307− if flag(bench-core) || impl(ghcjs)
307+ if flag(use-streamly-core) || impl(ghcjs)
308308 buildable: False
309309 else
310310 buildable: True
@@ -314,7 +314,7 @@ benchmark Prelude.WAsync
314314 type: exitcode-stdio-1.0
315315 hs-source-dirs: Streamly/Benchmark/Prelude
316316 main-is: WAsync.hs
317− if flag(bench-core) || impl(ghcjs)
317+ if flag(use-streamly-core) || impl(ghcjs)
318318 buildable: False
319319 else
320320 buildable: True
@@ -324,7 +324,7 @@ benchmark Prelude.Parallel
324324 type: exitcode-stdio-1.0
325325 hs-source-dirs: Streamly/Benchmark/Prelude
326326 main-is: Parallel.hs
327− if flag(bench-core) || impl(ghcjs)
327+ if flag(use-streamly-core) || impl(ghcjs)
328328 buildable: False
329329 else
330330 buildable: True
@@ -337,7 +337,7 @@ benchmark Data.Unfold
337337 type: exitcode-stdio-1.0
338338 hs-source-dirs: .
339339 main-is: Streamly/Benchmark/Data/Unfold.hs
340− if flag(bench-core) || impl(ghcjs)
340+ if flag(use-streamly-core) || impl(ghcjs)
341341 buildable: False
342342 else
343343 buildable: True
@@ -347,7 +347,7 @@ benchmark Data.Fold
347347 type: exitcode-stdio-1.0
348348 hs-source-dirs: Streamly/Benchmark/Data
349349 main-is: Fold.hs
350− if flag(bench-core) || impl(ghcjs)
350+ if flag(use-streamly-core) || impl(ghcjs)
351351 buildable: False
352352 else
353353 buildable: True
@@ -357,7 +357,7 @@ benchmark Data.Fold.Window
357357 type: exitcode-stdio-1.0
358358 hs-source-dirs: Streamly/Benchmark/Data/Fold
359359 main-is: Window.hs
360− if flag(bench-core)
360+ if flag(use-streamly-core)
361361 buildable: False
362362 else
363363 buildable: True
@@ -367,7 +367,7 @@ benchmark Data.Parser.ParserD
367367 type: exitcode-stdio-1.0
368368 hs-source-dirs: Streamly/Benchmark/Data/Parser
369369 main-is: ParserD.hs
370− if flag(bench-core) || impl(ghcjs)
370+ if flag(use-streamly-core) || impl(ghcjs)
371371 buildable: False
372372 else
373373 buildable: True
@@ -383,7 +383,7 @@ benchmark Data.Parser.ParserK
383383 type: exitcode-stdio-1.0
384384 hs-source-dirs: Streamly/Benchmark/Data/Parser
385385 main-is: ParserK.hs
386− if flag(bench-core) || impl(ghcjs)
386+ if flag(use-streamly-core) || impl(ghcjs)
387387 buildable: False
388388 else
389389 buildable: True
@@ -399,7 +399,7 @@ benchmark Data.Parser.FromParserK
399399 hs-source-dirs: Streamly/Benchmark/Data/Parser
400400 cpp-options: -DFROM_PARSERK
401401 main-is: ParserK.hs
402− if flag(bench-core) || impl(ghcjs)
402+ if flag(use-streamly-core) || impl(ghcjs)
403403 buildable: False
404404 else
405405 buildable: True
@@ -410,7 +410,7 @@ benchmark Data.Parser
410410 type: exitcode-stdio-1.0
411411 hs-source-dirs: Streamly/Benchmark/Data
412412 main-is: Parser.hs
413− if flag(bench-core) || impl(ghcjs)
413+ if flag(use-streamly-core) || impl(ghcjs)
414414 buildable: False
415415 else
416416 buildable: True
@@ -473,7 +473,7 @@ benchmark Prelude.Concurrent
473473 type: exitcode-stdio-1.0
474474 hs-source-dirs: Streamly/Benchmark/Prelude
475475 main-is: Concurrent.hs
476− if flag(bench-core)
476+ if flag(use-streamly-core)
477477 buildable: False
478478 else
479479 buildable: True
@@ -483,7 +483,7 @@ benchmark Prelude.Adaptive
483483 type: exitcode-stdio-1.0
484484 hs-source-dirs: Streamly/Benchmark/Prelude
485485 main-is: Adaptive.hs
486− if flag(bench-core) || impl(ghcjs)
486+ if flag(use-streamly-core) || impl(ghcjs)
487487 buildable: False
488488 else
489489 buildable: True
@@ -493,7 +493,7 @@ benchmark Prelude.Rate
493493 type: exitcode-stdio-1.0
494494 hs-source-dirs: Streamly/Benchmark/Prelude
495495 main-is: Rate.hs
496− if flag(bench-core) || impl(ghcjs)
496+ if flag(use-streamly-core) || impl(ghcjs)
497497 buildable: False
498498 else
499499 buildable: True
@@ -507,7 +507,7 @@ benchmark Data.Array
507507 type: exitcode-stdio-1.0
508508 hs-source-dirs: .
509509 main-is: Streamly/Benchmark/Data/Array.hs
510− if flag(bench-core)
510+ if flag(use-streamly-core)
511511 buildable: False
512512 else
513513 buildable: True
@@ -516,7 +516,7 @@ benchmark Data.SmallArray
516516 import: bench-options
517517 type: exitcode-stdio-1.0
518518 main-is: Streamly/Benchmark/Data/Array/SmallArray.hs
519− if flag(bench-core)
519+ if flag(use-streamly-core)
520520 buildable: False
521521 else
522522 buildable: True
@@ -525,7 +525,7 @@ benchmark Data.Array.Unboxed
525525 import: bench-options
526526 type: exitcode-stdio-1.0
527527 main-is: Streamly/Benchmark/Data/Array/Unboxed.hs
528− if flag(bench-core)
528+ if flag(use-streamly-core)
529529 buildable: False
530530 else
531531 buildable: True
@@ -538,7 +538,7 @@ benchmark Data.Array.Unboxed.Mut
538538 main-is: Streamly/Benchmark/Data/Array/Unboxed/Mut.hs
539539 if flag(limit-build-mem)
540540 ghc-options: +RTS -M1500M -RTS
541− if flag(bench-core)
541+ if flag(use-streamly-core)
542542 buildable: False
543543 else
544544 buildable: True
@@ -563,7 +563,7 @@ benchmark Data.Array.Stream.Foreign
563563 type: exitcode-stdio-1.0
564564 hs-source-dirs: Streamly/Benchmark/Data/Array/Stream
565565 main-is: Foreign.hs
566− if flag(bench-core) || impl(ghcjs)
566+ if flag(use-streamly-core) || impl(ghcjs)
567567 buildable: False
568568 else
569569 buildable: True
@@ -583,7 +583,7 @@ benchmark FileSystem.Handle
583583 , Handle.ReadWrite
584584 if flag(limit-build-mem)
585585 ghc-options: +RTS -M1000M -RTS
586− if flag(bench-core)
586+ if flag(use-streamly-core)
587587 buildable: False
588588 else
589589 buildable: True
@@ -599,7 +599,7 @@ benchmark Unicode.Stream
599599 main-is: Stream.hs
600600 if flag(limit-build-mem)
601601 ghc-options: +RTS -M1000M -RTS
602− if flag(bench-core)
602+ if flag(use-streamly-core)
603603 buildable: False
604604 else
605605 buildable: True
@@ -610,7 +610,7 @@ benchmark Unicode.Char
610610 hs-source-dirs: Streamly/Benchmark/Unicode
611611 main-is: Char.hs
612612 -- Takes too much memory for ghcjs
613− if flag(bench-core) || impl(ghcjs)
613+ if flag(use-streamly-core) || impl(ghcjs)
614614 buildable: False
615615
616616benchmark Unicode.Utf8
@@ -618,7 +618,7 @@ benchmark Unicode.Utf8
618618 type: exitcode-stdio-1.0
619619 hs-source-dirs: Streamly/Benchmark/Unicode
620620 main-is: Utf8.hs
621− if flag(bench-core)
621+ if flag(use-streamly-core)
622622 buildable: False
623623 else
624624 buildable: True
test/streamly-tests.cabal+29−29
@@ -40,7 +40,7 @@ flag opt
4040 manual: True
4141 default: True
4242
43−flag test-core
43+flag use-streamly-core
4444 description: Test only core package
4545 manual: True
4646 default: False
@@ -159,7 +159,7 @@ common test-dependencies
159159 , temporary >= 1.3 && < 1.4
160160 , network >= 3.1 && < 3.2
161161
162− if !flag(test-core)
162+ if !flag(use-streamly-core)
163163 build-depends: streamly
164164
165165 if flag(fusion-plugin) && !impl(ghcjs) && !impl(ghc < 8.6)
@@ -180,7 +180,7 @@ library
180180 import: lib-options, test-dependencies
181181 hs-source-dirs: lib
182182 exposed-modules: Streamly.Test.Common
183− if !flag(test-core)
183+ if !flag(use-streamly-core)
184184 exposed-modules: Streamly.Test.Prelude.Common
185185 if flag(limit-build-mem)
186186 ghc-options: +RTS -M1500M -RTS
@@ -230,7 +230,7 @@ test-suite Data.Array
230230 type: exitcode-stdio-1.0
231231 main-is: Streamly/Test/Data/Array.hs
232232 ghc-options: -main-is Streamly.Test.Data.Array.main
233− if flag(test-core)
233+ if flag(use-streamly-core)
234234 buildable: False
235235
236236test-suite Data.Array.Unboxed
@@ -250,14 +250,14 @@ test-suite Data.Ring.Unboxed
250250 type: exitcode-stdio-1.0
251251 main-is: Streamly/Test/Data/Ring/Unboxed.hs
252252 ghc-options: -main-is Streamly.Test.Data.Ring.Unboxed.main
253− if flag(test-core)
253+ if flag(use-streamly-core)
254254 buildable: False
255255
256256test-suite Data.Array.Stream.Foreign
257257 import: test-options
258258 type: exitcode-stdio-1.0
259259 main-is: Streamly/Test/Data/Array/Stream/Foreign.hs
260− if flag(test-core)
260+ if flag(use-streamly-core)
261261 buildable: False
262262
263263test-suite Data.Fold
@@ -290,7 +290,7 @@ test-suite Data.SmallArray
290290 type: exitcode-stdio-1.0
291291 main-is: Streamly/Test/Data/SmallArray.hs
292292 ghc-options: -main-is Streamly.Test.Data.SmallArray.main
293− if flag(test-core)
293+ if flag(use-streamly-core)
294294 buildable: False
295295
296296test-suite Data.Unfold
@@ -304,7 +304,7 @@ test-suite FileSystem.Event
304304 ghc-options: -main-is Streamly.Test.FileSystem.Event
305305 main-is: Streamly/Test/FileSystem/Event.hs
306306 other-modules: Streamly.Test.FileSystem.Event.Common
307− if flag(test-core)
307+ if flag(use-streamly-core)
308308 buildable: False
309309
310310test-suite FileSystem.Event.Darwin
@@ -316,7 +316,7 @@ test-suite FileSystem.Event.Darwin
316316 ghc-options: -main-is Streamly.Test.FileSystem.Event.Darwin
317317 if !os(darwin)
318318 buildable: False
319− if flag(test-core)
319+ if flag(use-streamly-core)
320320 buildable: False
321321
322322test-suite FileSystem.Event.Linux
@@ -328,7 +328,7 @@ test-suite FileSystem.Event.Linux
328328 ghc-options: -main-is Streamly.Test.FileSystem.Event.Linux
329329 if !os(linux)
330330 buildable: False
331− if flag(test-core)
331+ if flag(use-streamly-core)
332332 buildable: False
333333
334334test-suite FileSystem.Event.Windows
@@ -340,7 +340,7 @@ test-suite FileSystem.Event.Windows
340340 ghc-options: -main-is Streamly.Test.FileSystem.Event.Windows
341341 if !os(windows)
342342 buildable: False
343− if flag(test-core)
343+ if flag(use-streamly-core)
344344 buildable: False
345345
346346test-suite FileSystem.Handle
@@ -348,21 +348,21 @@ test-suite FileSystem.Handle
348348 type: exitcode-stdio-1.0
349349 main-is: Streamly/Test/FileSystem/Handle.hs
350350 ghc-options: -main-is Streamly.Test.FileSystem.Handle.main
351− if flag(test-core)
351+ if flag(use-streamly-core)
352352 buildable: False
353353
354354test-suite Network.Inet.TCP
355355 import: test-options
356356 type: exitcode-stdio-1.0
357357 main-is: Streamly/Test/Network/Inet/TCP.hs
358− if flag(test-core)
358+ if flag(use-streamly-core)
359359 buildable: False
360360
361361test-suite Network.Socket
362362 import: test-options
363363 type: exitcode-stdio-1.0
364364 main-is: Streamly/Test/Network/Socket.hs
365− if flag(test-core)
365+ if flag(use-streamly-core)
366366 buildable: False
367367
368368test-suite Prelude
@@ -370,7 +370,7 @@ test-suite Prelude
370370 type: exitcode-stdio-1.0
371371 main-is: Streamly/Test/Prelude.hs
372372 ghc-options: -main-is Streamly.Test.Prelude.main
373− if flag(test-core)
373+ if flag(use-streamly-core)
374374 buildable: False
375375
376376test-suite Prelude.Ahead
@@ -378,7 +378,7 @@ test-suite Prelude.Ahead
378378 type: exitcode-stdio-1.0
379379 main-is: Streamly/Test/Prelude/Ahead.hs
380380 ghc-options: -main-is Streamly.Test.Prelude.Ahead.main
381− if flag(test-core)
381+ if flag(use-streamly-core)
382382 buildable: False
383383
384384test-suite Prelude.Async
@@ -386,7 +386,7 @@ test-suite Prelude.Async
386386 type: exitcode-stdio-1.0
387387 main-is: Streamly/Test/Prelude/Async.hs
388388 ghc-options: -main-is Streamly.Test.Prelude.Async.main
389− if flag(test-core)
389+ if flag(use-streamly-core)
390390 buildable: False
391391
392392test-suite Prelude.Concurrent
@@ -396,7 +396,7 @@ test-suite Prelude.Concurrent
396396 ghc-options: -main-is Streamly.Test.Prelude.Concurrent.main
397397 if flag(limit-build-mem)
398398 ghc-options: +RTS -M2000M -RTS
399− if flag(test-core)
399+ if flag(use-streamly-core)
400400 buildable: False
401401
402402test-suite Prelude.Fold
@@ -404,7 +404,7 @@ test-suite Prelude.Fold
404404 type: exitcode-stdio-1.0
405405 main-is: Streamly/Test/Prelude/Fold.hs
406406 ghc-options: -main-is Streamly.Test.Prelude.Fold.main
407− if flag(test-core)
407+ if flag(use-streamly-core)
408408 buildable: False
409409
410410test-suite Prelude.Parallel
@@ -412,7 +412,7 @@ test-suite Prelude.Parallel
412412 type: exitcode-stdio-1.0
413413 main-is: Streamly/Test/Prelude/Parallel.hs
414414 ghc-options: -main-is Streamly.Test.Prelude.Parallel.main
415− if flag(test-core)
415+ if flag(use-streamly-core)
416416 buildable: False
417417
418418test-suite Prelude.Rate
@@ -424,7 +424,7 @@ test-suite Prelude.Rate
424424 buildable: True
425425 else
426426 buildable: False
427− if flag(test-core)
427+ if flag(use-streamly-core)
428428 buildable: False
429429
430430test-suite Prelude.Serial
@@ -434,14 +434,14 @@ test-suite Prelude.Serial
434434 ghc-options: -main-is Streamly.Test.Prelude.Serial.main
435435 if flag(limit-build-mem)
436436 ghc-options: +RTS -M1500M -RTS
437− if flag(test-core)
437+ if flag(use-streamly-core)
438438 buildable: False
439439
440440test-suite Prelude.Top
441441 import: test-options
442442 type: exitcode-stdio-1.0
443443 main-is: Streamly/Test/Prelude/Top.hs
444− if flag(test-core)
444+ if flag(use-streamly-core)
445445 buildable: False
446446
447447test-suite Prelude.WAsync
@@ -449,7 +449,7 @@ test-suite Prelude.WAsync
449449 type: exitcode-stdio-1.0
450450 main-is: Streamly/Test/Prelude/WAsync.hs
451451 ghc-options: -main-is Streamly.Test.Prelude.WAsync.main
452− if flag(test-core)
452+ if flag(use-streamly-core)
453453 buildable: False
454454
455455test-suite Prelude.WSerial
@@ -457,7 +457,7 @@ test-suite Prelude.WSerial
457457 type: exitcode-stdio-1.0
458458 main-is: Streamly/Test/Prelude/WSerial.hs
459459 ghc-options: -main-is Streamly.Test.Prelude.WSerial.main
460− if flag(test-core)
460+ if flag(use-streamly-core)
461461 buildable: False
462462
463463test-suite Prelude.ZipAsync
@@ -467,7 +467,7 @@ test-suite Prelude.ZipAsync
467467 ghc-options: -main-is Streamly.Test.Prelude.ZipAsync.main
468468 if flag(limit-build-mem)
469469 ghc-options: +RTS -M750M -RTS
470− if flag(test-core)
470+ if flag(use-streamly-core)
471471 buildable: False
472472
473473test-suite Prelude.ZipSerial
@@ -475,7 +475,7 @@ test-suite Prelude.ZipSerial
475475 type: exitcode-stdio-1.0
476476 main-is: Streamly/Test/Prelude/ZipSerial.hs
477477 ghc-options: -main-is Streamly.Test.Prelude.ZipSerial.main
478− if flag(test-core)
478+ if flag(use-streamly-core)
479479 buildable: False
480480
481481test-suite Unicode.Stream
@@ -483,7 +483,7 @@ test-suite Unicode.Stream
483483 type: exitcode-stdio-1.0
484484 main-is: Streamly/Test/Unicode/Stream.hs
485485 ghc-options: -main-is Streamly.Test.Unicode.Stream.main
486− if flag(test-core)
486+ if flag(use-streamly-core)
487487 buildable: False
488488
489489test-suite Unicode.Char
@@ -491,7 +491,7 @@ test-suite Unicode.Char
491491 type: exitcode-stdio-1.0
492492 main-is: Streamly/Test/Unicode/Char.hs
493493 ghc-options: -main-is Streamly.Test.Unicode.Char.main
494− if flag(test-core) || !flag(dev)
494+ if flag(use-streamly-core) || !flag(dev)
495495 buildable: False
496496
497497test-suite version-bounds