polynomial
polynomial copied to clipboard
doesn't build with GHC 8
I am running The Glorious Glasgow Haskell Compilation System, version 8.0.1 on Mac OS 10.12 I ran cabal install polynomial and it failed. Log file is below.
cabal: Entering directory '/var/folders/sr/jktws8p56m58qw9h6k53dbfr0000gn/T/cabal-tmp-2327/polynomial-0.7.2'
Configuring polynomial-0.7.2...
Building polynomial-0.7.2...
Preprocessing library polynomial-0.7.2...
[ 1 of 15] Compiling Data.List.ZipSum ( src/Data/List/ZipSum.hs, dist/build/Data/List/ZipSum.o )
on the commandline: warning: [-Wunsafe]
‘Data.List.ZipSum’ has been inferred as unsafe!
Reason:
src/Data/List/ZipSum.hs:3:1: error:
Data.AdditiveGroup: Can't be safely imported!
The module itself isn't safe.
[ 2 of 15] Compiling Data.VectorSpace.WrappedNum ( src/Data/VectorSpace/WrappedNum.hs, dist/build/Data/VectorSpace/WrappedNum.o )
src/Data/VectorSpace/WrappedNum.hs:22:18: error:
• Not in scope: type variable ‘a’
• In the Template Haskell quotation
[t| (U.Unbox a) => WrappedNum a -> a |]
src/Data/VectorSpace/WrappedNum.hs:22:35: error:
• Not in scope: type variable ‘a’
• In the Template Haskell quotation
[t| (U.Unbox a) => WrappedNum a -> a |]
src/Data/VectorSpace/WrappedNum.hs:22:40: error:
• Not in scope: type variable ‘a’
• In the Template Haskell quotation
[t| (U.Unbox a) => WrappedNum a -> a |]
cabal: Leaving directory '/var/folders/sr/jktws8p56m58qw9h6k53dbfr0000gn/T/cabal-tmp-2327/polynomial-0.7.2'
Just ran into this updating keysafe to ghc 8.
I guessed this might have something to do with existential quantification, and indeed, adding a forall gets it to build:
[t| forall a. (U.Unbox a) => WrappedNum a -> a |] [| unwrapNum |] [| \ a -> WrapNum a |]
Aha, https://github.com/mokus0/polynomial/pull/9 fixes this bug
I suppose this issue should have been closed as resolved back then?