[GHC] #10016: UNPACK support for existentials

GHC ghc-devs at haskell.org
Fri Jan 23 14:21:00 UTC 2015


#10016: UNPACK support for existentials
-------------------------------------+-------------------------------------
              Reporter:  simonpj     |             Owner:
                  Type:  feature     |            Status:  new
  request                            |         Milestone:
              Priority:  normal      |           Version:  7.8.4
             Component:  Compiler    |  Operating System:  Unknown/Multiple
              Keywords:              |   Type of failure:  None/Unknown
          Architecture:              |        Blocked By:
  Unknown/Multiple                   |   Related Tickets:
             Test Case:              |
              Blocking:              |
Differential Revisions:              |
-------------------------------------+-------------------------------------
 Consider
 {{{
 data Foo = forall a. Show a => Foo !a !a

 data Bar = Bar {-# UNPACK #-} !Foo
 }}}
 The UNPACK pragma should really be able to unpack the `Foo` field, so that
 (implementation-wise) it would be as if you'd declared `Bar` thus:
 {{{
 data Bar = forall a. Show a => Bar !a !a
 }}}
 But currently we get
 {{{
 Ignoring unusable UNPACK pragma on the first argument of ‘Bar’
 }}}
 Suggested by Nicholas Clarke [https://www.haskell.org/pipermail/glasgow-
 haskell-users/2015-January/025590.html here].

 Vaguely related tickets: #7647, #9214.  But unlike those ones, this one
 looks quite feasible to me.

--
Ticket URL: <http://ghc.haskell.org/trac/ghc/ticket/10016>
GHC <http://www.haskell.org/ghc/>
The Glasgow Haskell Compiler


More information about the ghc-tickets mailing list