Support for (the Liquid Haskell and other) GHC plugins
Hey, I am trying to setup LHS to work with the Liquid Haskell GHC plugin (it worked in the past, but stopped after upgrades).
My understanding is that LHS for efficiency ignores the GHC plugin flags set up in the *.cabal file, is that correct? If so, is there a way to force such plugins?
Thanks a lot!
Hi!
It would be news to me that HLS ignores the GHC plugins for any reasons. Ignoring typechecker plugins would make HLS incorrect, right? It should still work just like usual. Are you encountering any error messages?
HLS should still work with liquid haskell, I can give it a try later this week or at the beginning of next week and report back.
So, if in my *.cabal file I have ghc-options: -fplugin=LiquidHaskell, LHS should run the plugin or there is also a different place I can add it? Differently, is there a way to check what exactly is the command LHS is running?
Would be helpful if you try it to run it too! Let me know if I can help!
Ok, so I checked out the example repository https://github.com/ucsd-progsys/lh-plugin-demo
Currently, I see the error:
(TypeCheck,NormalizedFilePath "/home/dain/Documents/haskell/lh-plugin-demo/src/Demo/Erase.hs")not used by HLS/home/dain/.ghcup/ghc/9.12.2/lib/ghc-9.12.2/lib/../lib/x86_64-linux-ghc-9.12.2-16c3/libHSghc-prim-0.13.0-00de-ghc9.12.2.so
in my HLS session... Can you confirm similar errors or do you see other errors in your liquid haskell projects?
Thanks!!!!!
I confirm! The error I get is
(TypeCheck,NormalizedFilePath "/Users/niki.vazou/Desktop/rp-liquid-tutorial/src/Light.hs")not used by HLS/Users/niki.vazou/.ghcup/ghc/9.12.2/lib/ghc-9.12.2/lib/../lib/x86_64-osx-ghc-9.12.2-6757/libHSghc-prim-0.13.0-f079-ghc9.12.2.dylib compiler
This might be related to this bug report: https://github.com/haskell/haskell-language-server/issues/4631
I will have a look :)
Hey @fendor, did you manage to resolve it? :)
Not yet, I am still looking into it!
Ok! Let me know if you need feedback! Thanks!!!!
It looks like this only fails with GHC 9.12, but not with ghc 9.10.
I think I've fixed this in #4749:
Thanks!!!!! I will try it soon!