Open fendor opened 5 years ago
This project looks exciting, I'd love to start contributing! I can take a stab at this issue and let everyone know how it goes.
I think that https://github.com/haskell/haskell-ide-engine/blob/master/src/Haskell/Ide/Engine/Plugin/ApplyRefact.hs#L142 is responsible. I am not sure what the best way is to tackle the problem, e.g. I dont think the enabled Language Extensions are known in that function, so, that might be tricky. It is probably sensible to add a test to https://github.com/haskell/haskell-ide-engine/blob/master/test/unit/ApplyRefactPluginSpec.hs that reproduces the problem.
Given a module:
This error message is shown:
This is documented in https://github.com/ndmitchell/hlint/issues/607. Minimal project to reproduce: https://github.com/fendor/hlint-minimal-pattern
This happens because hlint assumes some default extensions. This makes sense, since hlint is normally not aware of a .cabal or package.yaml file, where extensions may be listed. However, HIE is aware of language extensions and could invoke hlint always with the right extensions.