From cafb26daf793855737dde7c0aaf76c4c12a884af Mon Sep 17 00:00:00 2001 From: hololeap Date: Fri, 28 Oct 2022 08:26:06 -0600 Subject: [PATCH] Add `threads` flag This flag will toggle the use of `ghc-options` in the `typed-process-test` test suite. It is set to `default: True`. This is needed for tests to run on some GHC builds which do not support a threaded runtime. Closes: https://github.com/fpco/typed-process/issues/59 Signed-off-by: hololeap --- package.yaml | 16 ++++++++++++---- 1 file changed, 12 insertions(+), 4 deletions(-) diff --git a/package.yaml b/package.yaml index 8fca99f..85c0a9f 100644 --- a/package.yaml +++ b/package.yaml @@ -22,6 +22,12 @@ dependencies: - transformers - unliftio-core +flags: + threads: + description: Use flags that depend on GHC supporting threaded runtime + default: True + manual: True + library: source-dirs: src when: @@ -32,10 +38,12 @@ tests: typed-process-test: main: Spec.hs source-dirs: test - ghc-options: - - -threaded - - -rtsopts - - -with-rtsopts=-N + when: + - condition: flag(threaded) + ghc-options: + - -threaded + - -rtsopts + - -with-rtsopts=-N dependencies: - base64-bytestring - hspec