[GHC] #11112: Error message for accidentally using -> instead of =>
GHC
ghc-devs at haskell.org
Thu Nov 19 13:44:57 UTC 2015
#11112: Error message for accidentally using -> instead of =>
-------------------------------------+-------------------------------------
Reporter: JulesBean | Owner:
Type: bug | Status: new
Priority: normal | Milestone:
Component: Compiler | Version: 7.10.2
Keywords: | Operating System: Unknown/Multiple
Architecture: | Type of failure: None/Unknown
Unknown/Multiple |
Test Case: | Blocked By:
Blocking: | Related Tickets:
Differential Rev(s): | Wiki Page:
-------------------------------------+-------------------------------------
Consider the following typo:
{{{#!hs
sort :: Ord s -> [s] -> [s]
sort xs = Data.List.sort xs
}}}
GHC's error message in 7.10 is
{{{
Expected a type, but ‘Ord s’ has kind ‘GHC.Prim.Constraint’
In the type signature for ‘Main.sort’:
Main.sort :: Ord s -> [s] -> [s]
}}}
I would suggest that mentioning kinds and GHC.Prim.Constraint is a bit
unfriendly in a vanilla session (with ConstraintKinds etc switched off).
For comparison, the 6.12 error message was
{{{
Class `Ord' used as a type
In the type signature for `sort': sort :: Ord a -> [a] -> [a]
}}}
--
Ticket URL: <http://ghc.haskell.org/trac/ghc/ticket/11112>
GHC <http://www.haskell.org/ghc/>
The Glasgow Haskell Compiler
More information about the ghc-tickets
mailing list