Closed ilkecan closed 2 years ago
COMPLETE pragmas cause warnings on older GHCs, which support pattern synonyms but not COMPLETE pragma. I'd guard them with CPP:
% cabal build -w ghc-8.0.2
Resolving dependencies...
Build profile: -w ghc-8.0.2 -O1
In order, the following will be built (use -v for more details):
- QuickCheck-2.14.2 (lib) (first run)
Configuring library for QuickCheck-2.14.2..
Preprocessing library for QuickCheck-2.14.2..
Building library for QuickCheck-2.14.2..
[ 1 of 16] Compiling Test.QuickCheck.Random ( src/Test/QuickCheck/Random.hs, /code/other-haskell/quickcheck/dist-newstyle/build/x86_64-linux/ghc-8.0.2/QuickCheck-2.14.2/build/Test/QuickCheck/Random.o )
[ 2 of 16] Compiling Test.QuickCheck.Gen ( src/Test/QuickCheck/Gen.hs, /code/other-haskell/quickcheck/dist-newstyle/build/x86_64-linux/ghc-8.0.2/QuickCheck-2.14.2/build/Test/QuickCheck/Gen.o )
[ 3 of 16] Compiling Test.QuickCheck.Gen.Unsafe ( src/Test/QuickCheck/Gen/Unsafe.hs, /code/other-haskell/quickcheck/dist-newstyle/build/x86_64-linux/ghc-8.0.2/QuickCheck-2.14.2/build/Test/QuickCheck/Gen/Unsafe.o )
[ 4 of 16] Compiling Test.QuickCheck.Exception ( src/Test/QuickCheck/Exception.hs, /code/other-haskell/quickcheck/dist-newstyle/build/x86_64-linux/ghc-8.0.2/QuickCheck-2.14.2/build/Test/QuickCheck/Exception.o )
[ 5 of 16] Compiling Test.QuickCheck.Text ( src/Test/QuickCheck/Text.hs, /code/other-haskell/quickcheck/dist-newstyle/build/x86_64-linux/ghc-8.0.2/QuickCheck-2.14.2/build/Test/QuickCheck/Text.o )
[ 6 of 16] Compiling Test.QuickCheck.State ( src/Test/QuickCheck/State.hs, /code/other-haskell/quickcheck/dist-newstyle/build/x86_64-linux/ghc-8.0.2/QuickCheck-2.14.2/build/Test/QuickCheck/State.o )
[ 7 of 16] Compiling Test.QuickCheck.Arbitrary ( src/Test/QuickCheck/Arbitrary.hs, /code/other-haskell/quickcheck/dist-newstyle/build/x86_64-linux/ghc-8.0.2/QuickCheck-2.14.2/build/Test/QuickCheck/Arbitrary.o )
[ 8 of 16] Compiling Test.QuickCheck.Modifiers ( src/Test/QuickCheck/Modifiers.hs, /code/other-haskell/quickcheck/dist-newstyle/build/x86_64-linux/ghc-8.0.2/QuickCheck-2.14.2/build/Test/QuickCheck/Modifiers.o )
[ 9 of 16] Compiling Test.QuickCheck.Poly ( src/Test/QuickCheck/Poly.hs, /code/other-haskell/quickcheck/dist-newstyle/build/x86_64-linux/ghc-8.0.2/QuickCheck-2.14.2/build/Test/QuickCheck/Poly.o )
[10 of 16] Compiling Test.QuickCheck.Function ( src/Test/QuickCheck/Function.hs, /code/other-haskell/quickcheck/dist-newstyle/build/x86_64-linux/ghc-8.0.2/QuickCheck-2.14.2/build/Test/QuickCheck/Function.o )
src/Test/QuickCheck/Function.hs:561:1: warning: [-Wunrecognised-pragmas]
Unrecognised pragma
src/Test/QuickCheck/Function.hs:571:1: warning: [-Wunrecognised-pragmas]
Unrecognised pragma
src/Test/QuickCheck/Function.hs:578:1: warning: [-Wunrecognised-pragmas]
Unrecognised pragma
[11 of 16] Compiling Test.QuickCheck.Property ( src/Test/QuickCheck/Property.hs, /code/other-haskell/quickcheck/dist-newstyle/build/x86_64-linux/ghc-8.0.2/QuickCheck-2.14.2/build/Test/QuickCheck/Property.o )
[12 of 16] Compiling Test.QuickCheck.Monadic ( src/Test/QuickCheck/Monadic.hs, /code/other-haskell/quickcheck/dist-newstyle/build/x86_64-linux/ghc-8.0.2/QuickCheck-2.14.2/build/Test/QuickCheck/Monadic.o )
[13 of 16] Compiling Test.QuickCheck.Test ( src/Test/QuickCheck/Test.hs, /code/other-haskell/quickcheck/dist-newstyle/build/x86_64-linux/ghc-8.0.2/QuickCheck-2.14.2/build/Test/QuickCheck/Test.o )
[14 of 16] Compiling Test.QuickCheck.Features ( src/Test/QuickCheck/Features.hs, /code/other-haskell/quickcheck/dist-newstyle/build/x86_64-linux/ghc-8.0.2/QuickCheck-2.14.2/build/Test/QuickCheck/Features.o )
[15 of 16] Compiling Test.QuickCheck.All ( src/Test/QuickCheck/All.hs, /code/other-haskell/quickcheck/dist-newstyle/build/x86_64-linux/ghc-8.0.2/QuickCheck-2.14.2/build/Test/QuickCheck/All.o )
[16 of 16] Compiling Test.QuickCheck ( src/Test/QuickCheck.hs, /code/other-haskell/quickcheck/dist-newstyle/build/x86_64-linux/ghc-8.0.2/QuickCheck-2.14.2/build/Test/QuickCheck.o )
EDIT: looks like COMPLETE pragmas was added in GHC-8.2: https://downloads.haskell.org/~ghc/8.2.2/docs/html/users_guide/8.2.1-notes.html#language
@nick8325 This should fix my problem reported in #344. Could this be merged?! :)
Thanks @ilkecan!
Hi. Without the added
COMPLETE
pragmas^1, usage ofFn
,Fn2
orFn3
result in a warning such asif
-Wincomplete-patterns
is enabled.