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

How to work with extensions that are set in cabal.file? #2

Open
anton-k opened this issue Feb 27, 2023 · 2 comments
Open

How to work with extensions that are set in cabal.file? #2

anton-k opened this issue Feb 27, 2023 · 2 comments

Comments

@anton-k
Copy link

anton-k commented Feb 27, 2023

But what if I set it in the cabal.file in the default-extensions: section

RecordWildCards language extension is not enabled. Please add {-# LANGUAGE RecordWildCards #-} pragma at the top of your module.
@anton-k
Copy link
Author

anton-k commented Feb 27, 2023

Is it possible to give path to cabal file for list of extensions to check, or provide extensions in some config file?

@elaforge
Copy link
Owner

The general mechanism is the .fix-imports file, which can go in the current directory, or you can have a global one in ~/.config/fix-imports. It doesn't have any way to merge those configs, though now that I think of it, that would be a pretty obvious and easy extension. It wouldn't be hard to snarf a list out of a cabal file either, I wouldn't turn down a PR that did something like that! But the way to do it right now without any code changes would be to paste the extension list out into a .fix-imports and then just keep them in sync by hand.

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