[GHC] #14561: Panic on levity polymorphic very unsafe coerce
GHC
ghc-devs at haskell.org
Wed Dec 6 20:04:04 UTC 2017
#14561: Panic on levity polymorphic very unsafe coerce
-------------------------------------+-------------------------------------
Reporter: goldfire | Owner: (none)
Type: bug | Status: new
Priority: normal | Milestone:
Component: Compiler | Version: 8.3
Keywords: | Operating System: Unknown/Multiple
LevityPolymorphism |
Architecture: | Type of failure: None/Unknown
Unknown/Multiple |
Test Case: | Blocked By:
Blocking: | Related Tickets:
Differential Rev(s): | Wiki Page:
-------------------------------------+-------------------------------------
{{{#!hs
{-# LANGUAGE TypeInType #-}
{-# LANGUAGE RankNTypes #-}
{-# LANGUAGE PolyKinds #-}
{-# LANGUAGE MagicHash #-}
module LevityId where
import GHC.Types
import GHC.Prim
levityPolymorphicId :: forall (a :: TYPE r). a -> a
levityPolymorphicId = unsafeCoerce#
}}}
{{{
(GHC version 8.3.20170928 for x86_64-apple-darwin):
runtimeRepPrimRep
typePrimRep (a_aW0 :: TYPE r_aVZ)
r_aVZ
Call stack:
CallStack (from HasCallStack):
callStackDoc, called at compiler/utils/Outputable.hs:1144:37 in
ghc:Outputable
pprPanic, called at compiler/simplStg/RepType.hs:358:5 in
ghc:RepType
runtimeRepPrimRep, called at compiler/simplStg/RepType.hs:344:5 in
ghc:RepType
kindPrimRep, called at compiler/simplStg/RepType.hs:307:18 in
ghc:RepType
typePrimRep, called at compiler/simplStg/UnariseStg.hs:666:8 in
ghc:UnariseStg
Please report this as a GHC bug: http://www.haskell.org/ghc/reportabug
}}}
As originally mentioned [https://github.com/ghc-proposals/ghc-
proposals/pull/98#issuecomment-349727273 here].
--
Ticket URL: <http://ghc.haskell.org/trac/ghc/ticket/14561>
GHC <http://www.haskell.org/ghc/>
The Glasgow Haskell Compiler
More information about the ghc-tickets
mailing list