
#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 Iceland_jack): Yeah this is something odd Replying to [comment:1 RyanGlScott]:
Perhaps this is my inexperience with this feature bleeding through. After all, I didn't even know "type constraints" were a thing until I stumbled upon this ticket.
Richard has a paper on [http://cs.brynmawr.edu/~rae/papers/2017/partiality/partiality.pdf Constrained Type Families], which as I understand it might express this with closed type classes who knows {{{#!hs class TypeLit (a :: Type) where instance TypeLit Nat instance TypeLit Symbol data T :: forall a. TypeLit a => a -> Type where MkNat :: T 42 MkSymbol :: T "Don't panic!" }}} -- Ticket URL: http://ghc.haskell.org/trac/ghc/ticket/12102#comment:3 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler