[GHC] #9171: Clarify error messages when there is a kind mismatch (was: Can't match type family with kind polymorphism)
GHC
ghc-devs at haskell.org
Thu Jun 5 13:43:33 UTC 2014
#9171: Clarify error messages when there is a kind mismatch
----------------------------------------------+----------------------------
Reporter: MikeIzbicki | Owner:
Type: bug | Status: new
Priority: normal | Milestone:
Component: Compiler | Version: 7.8.2
Resolution: | Keywords:
Operating System: Unknown/Multiple | Architecture:
Type of failure: GHC rejects valid program | Unknown/Multiple
Test Case: | Difficulty: Unknown
Blocking: | Blocked By:
| Related Tickets:
----------------------------------------------+----------------------------
Comment (by goldfire):
kosmikus is right -- kind variables are properly seen as arguments to a
type family, and the OP's code is correctly rejected.
However, the error message is quite suboptimal. I wonder if there's a way
to detect that kinds are at issue and to suggest `-fprint-explicit-kinds`
(which would make the problem more apparent). As a strawman proposal, we
could just look at the rendered output; if the "expected" and "actual" are
identical, suggest `-fprint-explicit-kinds`.
Leaving this ticket open as a request to fine-tune error message.
--
Ticket URL: <http://ghc.haskell.org/trac/ghc/ticket/9171#comment:2>
GHC <http://www.haskell.org/ghc/>
The Glasgow Haskell Compiler
More information about the ghc-tickets
mailing list