Open
Description
Your environment
Output of haskell-language-server --probe-tools
or haskell-language-server-wrapper --probe-tools
:
haskell-language-server version: 0.9.0.0 (GHC: 8.10.3) (PATH: /home/berberman/.cabal/store/ghc-8.10.3/haskell-language-server-0.9.0.0-81f61f357a41d74a3d6d524b9f8f4949ec5bbcb5dd08161f78f8859c0cd951c1/bin/haskell-language-server)
Tool versions found on the $PATH
cabal: 3.2.0.0
stack: Not found
ghc: 8.10.3
Which lsp-client do you use:
vscode
Steps to reproduce
Create a haskell file like this, then try applying code actions to remove redundant constraints:
{-# LANGUAGE MultiParamTypeClasses #-}
{-# LANGUAGE TypeOperators #-}
{-# OPTIONS_GHC -Wredundant-constraints #-}
class a ** b
f :: (**) a b => a -> b -> a
f = const
g :: ((**) a b) => a -> b -> a
g = const
h :: ((**) a b, Eq a) => a -> b -> a
h = const
Expected behaviour
It results in:
{-# LANGUAGE MultiParamTypeClasses #-}
{-# LANGUAGE TypeOperators #-}
{-# OPTIONS_GHC -Wredundant-constraints #-}
class a ** b
f :: a -> b -> a
f = const
g :: a -> b -> a
g = const
h :: a -> b -> a
h = const
Actual behaviour
f
's type signature becamef :: **) a => a -> b -> a
- no code action populated for
g
h
's type signature becameh :: (**) a b => a -> b -> a