
#14826: Flatten data types extending other data types in STG -------------------------------------+------------------------------------- Reporter: nomeata | Owner: (none) Type: feature request | Status: new Priority: low | Milestone: Component: Compiler | Version: 8.5 Resolution: | Keywords: 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 nomeata): This might be useful to be able to do {{{ data IntSet = NonEmpty !NonEmptyIntSet | Tip data NonEmptyIntSet = Bin … | Leaf … }}} and get more expressive types than the current {{{ data IntSet = Bin … | Leaf … | Tip }}} without having to pay a performance penalty for it. Or even {{{ data [a] = Nil | NonEmpty !(NEList a) data (NEList a) = Cons a [a] }}} (no, I am not proposing to change the `Prelude` :-)) -- Ticket URL: http://ghc.haskell.org/trac/ghc/ticket/14826#comment:1 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler