
#12766: Allow runtime-representation polymorphic data families -------------------------------------+------------------------------------- Reporter: Iceland_jack | Owner: Type: feature request | 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: #12369 | Differential Rev(s): Wiki Page: | -------------------------------------+------------------------------------- Comment (by Iceland_jack): Explore how ticket:12369#comment:3, ticket:12369#comment:4 fit into this. TODO How `Free` fits with [https://github.com/ghc-proposals/ghc- proposals/pull/30 Levity-Polymorphic Type Classes], can we define **something** like this {{{#!hs newtype instance Free (k :: TYPE rep -> Constraint) -> (TYPE rep -> TYPE rep) where Free0 :: (forall q. k q => (p -> q) -> q) -> Free k p }}} TODO or like this {{{#!hs newtype instance Fix (f :: TYPE rep -> TYPE rep) :: TYPE rep where In :: f (Fix f) -> Fix f }}} And would they be useful -- Ticket URL: http://ghc.haskell.org/trac/ghc/ticket/12766#comment:2 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler