
#12102: “Constraints in kinds” illegal family application in instance (+ documentation issues?) -------------------------------------+------------------------------------- Reporter: Iceland_jack | Owner: (none) Type: bug | Status: new Priority: normal | Milestone: Component: Compiler | Version: 8.0.1 Resolution: | Keywords: TypeInType Operating System: Unknown/Multiple | Architecture: | Unknown/Multiple Type of failure: None/Unknown | Test Case: Blocked By: | Blocking: Related Tickets: | Differential Rev(s): Wiki Page: | -------------------------------------+------------------------------------- Comment (by simonpj): I didn't even know we allowed constraints in kinds. We certainly should not allow lifted equality constraints, like `T :: forall k. (t1 ~ t2) => blah`. Because `(t1 ~ t2)` is represented by lifted, heap-allocated, possibly-bottom value, and we don't have a `case` expression in types to unpack it. Possibly we should allow unlifted equality `T :: forall k. (t1 ~# t2) => blah`. I'm not sure. But what you have is definitely wrong and should be rejected with a decent error message. (And the user manual should be fixed!) Richard what do you think? -- Ticket URL: http://ghc.haskell.org/trac/ghc/ticket/12102#comment:5 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler