-
Notifications
You must be signed in to change notification settings - Fork 704
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
Document that default-language defaults to Haskell98 #9668
Comments
I was going to update the docs (and manage the relevant tickets), when I noticed occourrences of cabal/cabal-install/src/Distribution/Client/CmdRepl.hs Lines 304 to 309 in 46a7bfc
Second one in cabal/cabal-install/src/Distribution/Client/ScriptUtils.hs Lines 374 to 377 in 46a7bfc
|
@ffaf1 Oh dear... What do you think is the main default, the one by which more things are determined? Could you investigate to determine if actually we use An easy way could be to write a simple package without |
I have created a draft (#9675) to see if nothing breaks changing 2010→98. If everything is green, steps will be:
|
Why default to Haskell98, which, I believe, is superceded by Haskell2010? 2010 is the current standard. Is there any context one can think of where 98 is preferable to 2010? |
Nope there isn't. My idea was just to: a) get $BLESSED in one place and b) document current behaviour. |
Yeah, having ^a^ consistent global default would be a big step forward regardless of the actual value. |
I'm not sure to what extent users are writing cabal packages without In having no reason to change the default (which seems to be rarely used), I don't think we should. Haskell98 is already the implicit default, so we simply document it as such. |
CI passed meanwhile, which most likely means that most likely those |
Absent
Defaulting to Haskell98 / Haskell2010 could break packages in the wild. One could fortify a future version of Cabal format (e. g., say that if Cabal file specifies |
It won't break them because we're documenting what it was actually doing (which was not what it was intended to do). If that had caused breakage then we would have heard about it by now. |
I see, thanks. For the reference, the existing documentation says:
|
Yes, that's why this PR to correct that. Changing to the incorrectly documented behavior would require a |
Thanks to @alt-romes, we are now sure that there are at least two defaults:
The situation is more complicated than we expected. |
There is of course a duty to document current behaviour, but everything is so fragile (targets are slices combined with If we don't, we rely on developer remembering not to shuffle slices. A Monoid is non commutative, but that is easily overlooked during a refactor. |
I suppose you are right that this may be to fragile to go on @ffaf1. But Cabal breaking builds or scripts will be very bad. If we are to bump defaults, we should probably make the default 2010 (rather than 98 or whatever GHC language edition) as it will:
|
I believe in the last Cabal dev meeting we agreed that it would be better for Cabal to default to
Haskell98
when nodefault-language
is specified in the package. This is already the current behaviour, however, I believe it is undocumented.This ticket tracks documenting that not specifying a default-language makes Cabal default to
Haskell98
The text was updated successfully, but these errors were encountered: