Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

doesn't build with GHC 8 #8

Open
rzil opened this issue Oct 1, 2016 · 4 comments
Open

doesn't build with GHC 8 #8

rzil opened this issue Oct 1, 2016 · 4 comments

Comments

@rzil
Copy link

rzil commented Oct 1, 2016

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'
@joeyh
Copy link

joeyh commented Oct 27, 2016

Just ran into this updating keysafe to ghc 8.

@joeyh
Copy link

joeyh commented Oct 27, 2016

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 |]

@joeyh
Copy link

joeyh commented Oct 27, 2016

Aha, #9 fixes this bug

@kindaro
Copy link

kindaro commented Jul 30, 2019

I suppose this issue should have been closed as resolved back then?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants