-
Notifications
You must be signed in to change notification settings - Fork 847
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
stack repl
does not use default-language
setting
#5973
Comments
I think that what you experience is the intended behaviour, and you have to set the GHCi 'language' expressly if you do not want GHCi's default ( For example, if you had a multi-package project (with different There is a sort of related discussion here https://gitlab.haskell.org/ghc/ghc/-/issues/19207 about GHCi's ignoring of |
@mpilgrem That's a good point. I hadn't considered about the language setting used at the repl prompt vs. loading files. That said, I think I oversimplified the example from the original issue I encountered. Shouldn't I still expect the files loaded from the project to processed as newtype MyInt = MyInt Int deriving Num in the file then |
I think that, when GHCi loads a module, it respects any |
@mpilgrem At the very least By comparison, |
@qxjit, thanks. In that case, it seems to me that Stack should treat |
Fix #5973 `stack ghci` makes use of Cabal file `default-language` keys
@qxjit, I think this is now implemented in the |
1 similar comment
@qxjit, I think this is now implemented in the |
@mpilgrem I tested it as well and it appears to work as expected. Thank you! |
General summary/comments
stack repl
does not use thedefault-language
setting given in cabal files. This only seems to be the case forstack repl
(and the equivalentstack ghci
).stack build
behaves as expected.Steps to reproduce
stack new stack-bug-test
cd stack-bug-test
stack-bug-test.cabal
hasdefault-language: Haskell2010
for all targetsstack repl
:show language
at the repl promptExpected
base language is: Haskell2010
reportedActual
base language is: GHC2021
reportedOutput
https://gist.github.com/qxjit/702442014b52aced86a6155aea120ad8
Stack version
Method of installation
The text was updated successfully, but these errors were encountered: