[GHC] #11548: Absolutely misleading error message on kind error
GHC
ghc-devs at haskell.org
Sat Feb 6 05:33:18 UTC 2016
#11548: Absolutely misleading error message on kind error
-------------------------------------+-------------------------------------
Reporter: mniip | Owner:
Type: bug | Status: new
Priority: high | Milestone:
Component: Compiler | Version: 8.1
Keywords: | Operating System: Unknown/Multiple
Architecture: | Type of failure: Incorrect
Unknown/Multiple | warning at compile-time
Test Case: | Blocked By:
Blocking: | Related Tickets:
Differential Rev(s): | Wiki Page:
-------------------------------------+-------------------------------------
{{{#!hs
module Bug where
import Data.Proxy
fun :: Proxy a -> ()
fun Proxy = ()
bug :: ()
bug = fun (Proxy :: Proxy Maybe)
}}}
{{{#!hs
[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)
}}}
7.10 gives the appropriate `Couldn't match kind ‘* -> *’ with ‘*’`
message.
--
Ticket URL: <http://ghc.haskell.org/trac/ghc/ticket/11548>
GHC <http://www.haskell.org/ghc/>
The Glasgow Haskell Compiler
More information about the ghc-tickets
mailing list