[GHC] #12766: Allow runtime-representation polymorphic data families

#12766: Allow runtime-representation polymorphic data families -------------------------------------+------------------------------------- Reporter: Iceland_jack | Owner: Type: feature | Status: new request | Priority: normal | Milestone: Component: Compiler | Version: 8.0.1 Keywords: TypeInType | Operating System: Unknown/Multiple Architecture: | Type of failure: None/Unknown Unknown/Multiple | Test Case: | Blocked By: Blocking: | Related Tickets: #12369 Differential Rev(s): | Wiki Page: -------------------------------------+------------------------------------- This is an offshoot of #12369 (‘ data families shouldn't be required to have return kind *, data instances should’), allowing family declarations something like: {{{#!hs data family Array a :: TYPE rep }}} -- Ticket URL: http://ghc.haskell.org/trac/ghc/ticket/12766 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler

#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: | -------------------------------------+------------------------------------- Description changed by Iceland_jack: @@ -1,1 +1,1 @@ - This is an offshoot of #12369 (‘ data families shouldn't be required to + This is an offshoot of #12369 (‘data families shouldn't be required to New description: This is an offshoot of #12369 (‘data families shouldn't be required to have return kind *, data instances should’), allowing family declarations something like: {{{#!hs data family Array a :: TYPE rep }}} -- -- Ticket URL: http://ghc.haskell.org/trac/ghc/ticket/12766#comment:1 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler

#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
participants (1)
-
GHC