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

ob repl adds extensions to files #1057

Open
augyg opened this issue Dec 25, 2023 · 1 comment
Open

ob repl adds extensions to files #1057

augyg opened this issue Dec 25, 2023 · 1 comment

Comments

@augyg
Copy link
Contributor

augyg commented Dec 25, 2023

I have very little understanding of how this happened but felt I should report it

I was using ob repl to write code involving inspection of Aeson/JSON keys and used the IsString functionality of Key to write one as a string literal for KeyMap.lookup function, I suspect this triggered something I'm not aware of.

Once I had worked through some errors and the module I was developing in compiled, another module which has a lot of jsaddle based functions in it, that I had not touched while working suddenly had the error "Could not deduce (Data.String.IsString a1)". For context, because I have a lot of JSaddle code in this module I have disabled OverloadedStrings to avoid this error.

When I reloaded with 'ob run' everything was working correctly again.

@alexfmpe
Copy link
Contributor

For context, because I have a lot of JSaddle code in this module I have disabled OverloadedStrings to avoid this error.
As in, NoOverloadedStringsat the top of this module?

The extension adding likely comes from the preprocessor which adds per-file pragmas: #489 (comment)

If the .cabal enables Foo extension and the .hs uses NoFoo, they both end up in the file, but I assume the .cabal one ends up first which probably means it's overridden?

Not sure why it was reloaded without you touching it though.

At any rate the preprocessor is likely to go away with a future cabal release once https://well-typed.com/blog/2023/03/cabal-multi-unit/ stabilizes.

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

2 participants