[GHC] #14992: Allow existentials to UNPACK
GHC
ghc-devs at haskell.org
Mon Apr 2 16:08:22 UTC 2018
#14992: Allow existentials to UNPACK
-------------------------------------+-------------------------------------
Reporter: simonpj | Owner: (none)
Type: bug | Status: new
Priority: normal | Milestone:
Component: Compiler | Version: 8.2.2
Keywords: | Operating System: Unknown/Multiple
Architecture: | Type of failure: None/Unknown
Unknown/Multiple |
Test Case: | Blocked By:
Blocking: | Related Tickets:
Differential Rev(s): | Wiki Page:
-------------------------------------+-------------------------------------
Consider
{{{
data T a where
MkT :: b -> (b->a) -> T a
data Wuggle where
MkW :: {-# UNPACK #-} !T Int -> Wuggle
}}}
Here `MkT` has an existential, but there is really no reason that it can't
unpack into the data constructor for `MkW`. But it is currently rejected.
Fixing this would require quite a bit of new plumbing. E.g. the
existential type variable of the worker and wrapper would differ, which is
not true today. But morally it's the Right Thing.
--
Ticket URL: <http://ghc.haskell.org/trac/ghc/ticket/14992>
GHC <http://www.haskell.org/ghc/>
The Glasgow Haskell Compiler
More information about the ghc-tickets
mailing list