Absolutely misleading error message on kind error
module Bug where
import Data.Proxy
fun :: Proxy a -> ()
fun Proxy = ()
bug :: ()
bug = fun (Proxy :: Proxy Maybe)
[1 of 1] Compiling Bug ( Bug.hs, Bug.o )
Bug.hs:9:12: error:
• Expected kind ‘Proxy Maybe’,
but ‘Data.Proxy.Proxy :: Proxy Maybe’ has kind ‘Proxy Maybe’
• In the first argument of ‘fun’, namely ‘(Proxy :: Proxy Maybe)’
In the expression: fun (Proxy :: Proxy Maybe)
In an equation for ‘bug’: bug = fun (Proxy :: Proxy Maybe)
- 10 gives the appropriate
Couldn't match kind ‘* -> *’ with ‘*’
message.
Trac metadata
Trac field | Value |
---|---|
Version | 8.1 |
Type | Bug |
TypeOfFailure | OtherFailure |
Priority | high |
Resolution | Unresolved |
Component | Compiler |
Test case | |
Differential revisions | |
BlockedBy | |
Related | |
Blocking | |
CC | |
Operating system | |
Architecture |