Improve error for when an expression cannot have visible type arguments
Currently the error for trying to use visible type arguments for a binding without signature looks like this:
ghci> f x y = show x ++ y
ghci> :t f @Int
<interactive>:1:1: error: [GHC-95781]
• Cannot apply expression of type ‘a0 -> [Char] -> [Char]’
to a visible type argument ‘Int’
• In the expression: f @Int
It would be better if the error
- Explained why the visible type argument can't be applied (explanation in the user guide)
- Suggested adding a signature