-
Notifications
You must be signed in to change notification settings - Fork 20
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
tests fail with hint-0.5.0 #157
Comments
Seems like the culprit is haskell-hint/hint@b97aa88, which was just re-running the scripts to generate code with GHC 7.10. I wonder if the extension was removed in newer GHC versions? If not, I might have done something wrong or the generator program might be buggy. |
Eventually I'll make Hawk work with hint-0.5.0, but for now let's just require an older version.
Looking at the diff for that commit, it looks like a bunch of new extensions were added, and that the "No" prefix was removed from all the extensions.
So I'm guessing that instead of having some extensions which disable some default behaviours, GHC now allows any extension to be disabled using the prefix "No", and a few of those extensions are now enabled by default. |
I'm not sure what the correct fix for Two solutions come to mind to fix the breakage:
|
I tried compiling a file containing every single extension in your updated list and every single extension prefixed with "No". GHC 7.10.3 accepted almost everything, except those:
|
I don't understand what GHC's use of Also, correction on my part - I'm not getting the extensions list from the GHC APIs, but from the Cabal ones. See for example: https://hackage.haskell.org/package/Cabal-1.22.4.0/docs/src/Language.Haskell.Extension.html I don't fully understand why this is being exposed by Cabal. This might also mean that the problem wasn't a newer GHC, but a newer Cabal. |
To clarify on the last comment, the generator program uses |
I see that cabal prepends "No" a few lines below, in I there any particular reason why hint defines its own data type instead of reusing cabal's? |
Then we're probably using this API wrong.
No idea. @jcpetruzza wrote this code, so he might be able to answer. Daniel, I'm pinging you on a bunch of issues to ask questions on the codebase - apologies if that bothers you. |
(@mvdan I'm happy to help) On the question of why not re-use cabal's datatype, my motivations were: 1) avoid the extra dependency and, 2) pin a concrete version of the datatype (not cabal) to each version of hint. Otherwise, two people could be using the same version of hint and yet have different sets of extensions available, each coming from a different version of cabal. What I think happened in this: historically ghc had some extensions whose name started with "No" (e.g. NoMonomorphismExtension, NoImplicitPrelude) and these were available in the cabal extension datatype; at some point it was decided to standardize the name of the extensions and have every extension in a positive and a negative version, hence "ImplicitPrelude" and "NoImplicitPrelude" are now accepted. I suppose then cabal decided to offer only the positive variant for consistency and hint's script that generates the extensions broke at that point. Fixing the generator script shouldn't be hard imo |
Okay; then it's clear that I (unintentionally) broke backwards compatibility in Hint. Thankfully though, it was in I'll open an issue about this. |
Technically, before 1.0 you're allowed to break whatever you want between any level of release. Please don't though :) |
Breaking backwards compatibility still sucks - especially if it's not documented :) |
The value
NoImplicitPrelude
(and probably others) was removed in hint-0.5.0 for some reason?The text was updated successfully, but these errors were encountered: