Closed cartazio closed 10 years ago
Hi, I am enthropy. If I add RankNTypes, ImpredicativeTypes
to DecodeAST and EncodeAST it compiles (provided I also use -fshared-llvm)
On the other hand my ghc is version 7.7.20140120
(also @aavogt 's testing on linux, so he's not hitting any mac issues too)
i'm using cabal 1.18 too
Does it really require ImpredicativeTypes? RankNTypes alone is not enough?
Is there a separate issue requiring "-fshared-llvm"?
Yup, Both impredicative types AND rank n are needed. I tried sans impredicative. No go.
-fshared-llvm is needed to use llvm-general in ghci in 7.8. get linker errors and associated madness with the static linked version. see https://gist.github.com/cartazio/8744168
i've opened a separate ticket for the shared-llvm issue
@aavogt did you get the linking error with compiled code or just using it in ghci?
@cartazio the linking error was when building library itself (so I didn't explicitly call ghci, but maybe with the template-haskell used somewhere in the library it is practically involved?)
so both! (ghci in 7.8 uses the system dylinker on x86/x86_64/ARM, and TH runs via ghci).
Can you offer any documentation on the change in 7.8? It looks like the central code causing the change is the stuff in AnyContT (under Control.Monad.AnyCont), which previously had RankNTypes. Why is ImpredicativeTypes now necessary, and why in modules using AnyCont rather than just in AnyCont?
i'll test / report back in a day or so (if i don't, holler and i'll put at the top of my queue of tasks again)
@bscarlet, https://ghc.haskell.org/trac/ghc/ticket/8565 is plausibly related.
yup! Thats the relevant GHC change i was thinking of. Thanks for digging that up @iainnicol :)
ok, only ImpredicativeTypes is needed in the decode / encode modules. No need to add the rankN types flags therein
hrmm, so based on the most recent comments on thist ticket https://ghc.haskell.org/trac/ghc/ticket/8631#comment:12, the type checker issue might be resolved on the GHC side for 7.8.
Yes, this triggered a regression in GHC 7.8. It's now fixed in HEAD, and it should be merged for the release of 7.8 -- you shouldn't need ImpredicativeTypes to compile the module.
Thank's for doing all the work! As it looks, this issue should be a non-issue before 7.8 is released, so I'm going to close it. Feel free to re-open it if necessary.
theres a breaking change in 7.8 wrt whats considered higher rank / impredicative types
via enthropy on irc (im still sorting out mac related issues)