
#10016: UNPACK support for existentials -------------------------------------+------------------------------------- Reporter: simonpj | Owner: (none) Type: feature request | Status: new Priority: normal | Milestone: Component: Compiler | Version: 7.8.4 Resolution: | Keywords: DataCons Operating System: Unknown/Multiple | Architecture: Type of failure: Runtime | Unknown/Multiple performance bug | Test Case: Blocked By: | Blocking: Related Tickets: | Differential Rev(s): Wiki Page: | -------------------------------------+------------------------------------- Comment (by dfeuer): As far as I can tell, the only time this feature would be ''essential'' would be a situation where you want to unpack an existential and don't have access to its constructor. That makes the "killer app" a bit tricky to find. On the other hand, it would certainly support the sum-of-records pattern: {{{#!hs data Foo = This | That !Bar data Bar = Bar { ... } }}} This lets people use named fields in sum types without introducing partial functions. As it is, it won't be efficient if `Bar` has any existentials. -- Ticket URL: http://ghc.haskell.org/trac/ghc/ticket/10016#comment:5 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler