Closed
Description
Your environment
MacOS
GHC 9.4.5 from ghcup
cabal
emacs+lsp-mode
HLS v2.2.0.0 from ghcup
Steps to reproduce
Write some code with an undefined variable, e.g.:
foo :: Int -> Int
foo x = plus x (plus x x)
Invoke the code action Define plus...
Result:
plus :: Int -> t0 -> Int Suggested fix: Perhaps use ‘mplus’ (imported from Control.Monad.Reader)
plus = _
Expected behaviour
The suggestion should not be in the type signature, possibly it could be a comment before/after the type signature.
Actual behaviour
Suggestion in the signature, causing a parse error.