From ffe3c9b706db3bf0bba6c6e070c838daa5e4591e Mon Sep 17 00:00:00 2001 From: Taylor Fausak Date: Sat, 4 Dec 2021 15:26:06 -0500 Subject: [PATCH] Add `pedantic` flag and remove `cabal.project` --- .github/workflows/ci.yaml | 1 + .gitignore | 1 + cabal.project | 6 ------ witch.cabal | 11 ++++++++++- 4 files changed, 12 insertions(+), 7 deletions(-) delete mode 100644 cabal.project diff --git a/.github/workflows/ci.yaml b/.github/workflows/ci.yaml index 74c9092..78457b8 100644 --- a/.github/workflows/ci.yaml +++ b/.github/workflows/ci.yaml @@ -31,6 +31,7 @@ jobs: with: ghc-version: ${{ matrix.ghc }} cabal-version: ${{ matrix.cabal }} + - run: cabal configure --enable-tests --flags pedantic --jobs - run: cabal freeze && cat cabal.project.freeze - uses: actions/cache@v2 with: diff --git a/.gitignore b/.gitignore index f9aca15..064ab2b 100644 --- a/.gitignore +++ b/.gitignore @@ -2,6 +2,7 @@ /.ghc.environment* /.stack-work/ /cabal.project.freeze +/cabal.project.local* /cabal.sandbox.config /dist-newstyle/ /dist/ diff --git a/cabal.project b/cabal.project deleted file mode 100644 index 8d2a898..0000000 --- a/cabal.project +++ /dev/null @@ -1,6 +0,0 @@ -jobs: $ncpus -packages: . - -package witch - ghc-options: -Werror - tests: True diff --git a/witch.cabal b/witch.cabal index de9b156..4b48086 100644 --- a/witch.cabal +++ b/witch.cabal @@ -16,6 +16,11 @@ source-repository head location: https://github.com/tfausak/witch type: git +flag pedantic + default: False + description: Enables @-Werror@, which turns warnings into errors. + manual: True + common basics build-depends: , base >= 4.10.0 && < 4.17 @@ -46,11 +51,15 @@ common basics ghc-options: -Wno-missing-safe-haskell-mode -Wno-prepositive-qualified-module - + if impl(ghc >= 9.2) ghc-options: -Wno-missing-kind-signatures + if flag(pedantic) + ghc-options: + -Werror + library import: basics