Open
Description
Your environment
Which OS do you use: Ubuntu 20.04
Steps to reproduce
In a Haskell file, define the function func
as follows:
func = filter . (/=)
Expected behaviour
The synthetized type (suggested by language server) should be func :: Eq a => a -> [a] -> [a]
. This definition works just fine in GHCi command line with the previously-mentioned result.
Actual behaviour
Instead, the following annotation is suggested:
func :: GHC.Types.Any -> [GHC.Types.Any] -> [GHC.Types.Any]
and an error marker is put for (/=)
, with the error Ambiguous type variable ‘a0’ arising from a use of /= prevents the constraint (Eq a0) from being solved.