
#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 MikeIzbicki): Replying to [comment:1 kosmikus]: I was under the impression that type families had to be functions, and so: {{{ type family GetParam (p::k1) (t::k2) :: k3 type instance GetParam Base Int = Int type instance GetParam Base Int = Maybe }}} would be rejected for having conflicting definitions. If we change the code to: {{{ type family GetParam (p::k1) (t::k2) :: * type instance GetParam Base Int = Int type instance GetParam Base Int = Double }}} then the program does get rejected as having conflicting definitions. Is there a good reason to allow the former but not the latter? -- Ticket URL: http://ghc.haskell.org/trac/ghc/ticket/9171#comment:3 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler