-
Notifications
You must be signed in to change notification settings - Fork 30
Make applyRefactoring take GHC extensions #98
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
Conversation
Also, `parseExtensions` now adds implied extensions. This requires depending on ghc-lib-parser-ex, which doesn't seem to support GHC 8.6. As a result, GHC 8.6 is no longer supported.
Co-authored-by: Javier Neira <atreyu.bbb@gmail.com>
@zliu41 Thanks for this nice api addition.
That is unfortunate, as we are supporting ghc-8.6 in hls. And this is so cause there is no reliable ghc version > 8.6 for windows. |
In th hls-hlint-plugin we are using Here we are using |
Yeah, I can copy the definition of I think the proper solution is to migrate to ghc-lib-parser. That makes supporting multiple GHC versions a lot easier. However, ghc-exactprint is still on native GHC, so needs to be migrated first, and that's a huge task. |
Nice, would be too much ask for that workaround? maybe under a cpp flag? |
Definitely not too much to ask. It's just a list of which extension implies which extension. |
@jneira Let me know if this looks reasonable! 🙂 |
It looks great, many thanks 👍 |
@zliu41 It is somewhat weird (cause ci is green for ghc-8.8.4) but i cant build the package with this merged and ghc-8.8.4 in windows, it throws many errors like:
Sorry, maybe i had to check its integration in hls before merging |
@jneira This error suggests that we need to disable the I did this in |
Or perhaps you are using a different version of Cabal that has a different way of specifying dependency flags. My version is 3.2.0.0. You may want to check the documentation of the version you are using. |
@zliu41 thanks, we are using ghc-lib-parser-ex for ghc < 8.10, following hlint configuration: if ((!flag(ghc-lib) && impl(ghc >=8.10.1)) && impl(ghc <8.11.0))
build-depends: ghc ^>= 8.10
else
build-depends:
, ghc
, ghc-lib ^>= 8.10.2.20200916
, ghc-lib-parser-ex ^>= 8.10
cpp-options: -DGHC_LIB So not sure if that would be compatible with |
With those flags (
Maybe @shayne-fletcher could give us some advise in how to combine these pieces 🤔 |
I suppose a possible solution could be |
I don't think I wonder if there's an easy way to convert GHC's If not, I can change |
I am doing just that 😄
Here |
Agree with that, we have to switch to dynamic typing here 😝 |
I'm not sure I can but I can explain those flags in case it helps.
|
Also,
parseExtensions
now adds implied extensions. This requires depending on ghc-lib-parser-ex, which doesn't seem to support GHC 8.6. As a result, GHC 8.6 is no longer supported.