[GHC] #14978: GADTs don't seem to unpack properly
GHC
ghc-devs at haskell.org
Mon Mar 26 17:39:40 UTC 2018
#14978: GADTs don't seem to unpack properly
-------------------------------------+-------------------------------------
Reporter: dfeuer | Owner: (none)
Type: bug | Status: new
Priority: normal | Milestone: 8.6.1
Component: Compiler | Version: 8.2.2
Keywords: | 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:
-------------------------------------+-------------------------------------
Consider this simple code:
{{{#!hs
type family Foo a b
data Goof a b where
Goof :: !(Foo a b :~: Int) -> Goof a b
}}}
`(:~:)` has just one constructor (`Refl`) with no arguments, so I'd expect
it to unpack to a void representation:
{{{#!hs
GoofConstr :: Foo a b ~N# Int => Goof a b
WGoof :: Foo a b :~: Int -> Goof a b
WGoof eq = case eq of Refl -> GoofConstr
}}}
But it doesn't seem to unpack at all.
--
Ticket URL: <http://ghc.haskell.org/trac/ghc/ticket/14978>
GHC <http://www.haskell.org/ghc/>
The Glasgow Haskell Compiler
More information about the ghc-tickets
mailing list