fusion-plugin icon indicating copy to clipboard operation
fusion-plugin copied to clipboard

lsp: Simplifier phase 0/"main" not found

Open unhammer opened this issue 4 years ago • 2 comments

When I turn this on, haskell-language-server just says Simplifier phase 0/"main" not found and gives none of the other hints. Is there some additional setup required to get this to work with lsp or should I just turn it off in .cabal while developing?

unhammer avatar Jan 08 '22 08:01 unhammer

This happens because fusion-plugin requires optimization to be turned on. When you use it with ghci or with lsp which is the same thing, then you will get this error. Maybe we can add a workaround in the fusion-plugin so that it does nothing in this case. But for now you can put fusion-plugin under a build flag. When that flag is on makes sure optimization is on. Like in streamly-examples.cabal.

harendra-kumar avatar Jan 08 '22 11:01 harendra-kumar

OK, thanks, the workaround seems to do the trick :)

unhammer avatar Jan 08 '22 20:01 unhammer