[GHC] #10141: Kind inference regression in closed type families
GHC
ghc-devs at haskell.org
Mon Mar 9 05:30:16 UTC 2015
#10141: Kind inference regression in closed type families
-------------------------------------+-------------------------------------
Reporter: goldfire | Owner: goldfire
Type: bug | Status: new
Priority: highest | Milestone: 7.10.1
Component: Compiler | Version: 7.10.1-rc2
Resolution: | Keywords:
Operating System: Unknown/Multiple | Architecture:
Type of failure: None/Unknown | Unknown/Multiple
Blocked By: | Test Case:
Related Tickets: | Blocking:
| Differential Revisions:
-------------------------------------+-------------------------------------
Comment (by goldfire):
Responding to comment:3:
No, the return kind could well be `*`. I'll rewrite with explicit kinds:
{{{
type family G (a :: k) :: * where
G * Int = Bool
G * Bool = Int
G * a = a
}}}
This `G` doesn't really use its kind-polymorphism, but the definition kind
checks.
However, I think you're right about the suggestion for a CUSK, here and in
other cases. And I think it's possible for GHC to have at least some
heuristics for when a CUSK is the answer. Specifically, it could include a
note about CUSKs in error messages that arise from kind mismatches in non-
CUSK right-hand sides.
And, yes, this would make for a decent test case. Thanks for the
suggestion.
I'm very unsure I can get to this by Friday (the next RC release), though!
--
Ticket URL: <http://ghc.haskell.org/trac/ghc/ticket/10141#comment:6>
GHC <http://www.haskell.org/ghc/>
The Glasgow Haskell Compiler
More information about the ghc-tickets
mailing list