[GHC] #13458: Panic with unsafeCoerce and -dcore-lint
GHC
ghc-devs at haskell.org
Mon Mar 27 23:25:32 UTC 2017
#13458: Panic with unsafeCoerce and -dcore-lint
-------------------------------------+-------------------------------------
Reporter: dfeuer | Owner: goldfire
Type: bug | Status: merge
Priority: normal | Milestone: 8.2.1
Component: Compiler (Type | Version: 8.1
checker) | Keywords:
Resolution: | LevityPolymorphism
Operating System: Unknown/Multiple | Architecture:
| Unknown/Multiple
Type of failure: Compile-time | Test Case:
crash or panic | typecheck/should_compile/T13458
Blocked By: | Blocking:
Related Tickets: | Differential Rev(s):
Wiki Page: |
-------------------------------------+-------------------------------------
Comment (by rwbarton):
This is causing a large number of warnings to be printed while building
GHC, of the form
{{{
<no location info>: warning:
In the expression: byteArrayContents#
(ipv3_s9ST
`cast` (UnsafeCo representational
(MutableByteArray# RealWorld)
ByteArray#
:: (MutableByteArray# RealWorld :: TYPE
'UnliftedRep)
~R#
(ByteArray# :: TYPE 'UnliftedRep)))
Unsafe coercion: left-hand type is levity-polymorphic
From: MutableByteArray# RealWorld
To: ByteArray#
<no location info>: warning:
In the expression: byteArrayContents#
(ipv3_s9ST
`cast` (UnsafeCo representational
(MutableByteArray# RealWorld)
ByteArray#
:: (MutableByteArray# RealWorld :: TYPE
'UnliftedRep)
~R#
(ByteArray# :: TYPE 'UnliftedRep)))
Unsafe coercion: right-hand type is levity-polymorphic
From: MutableByteArray# RealWorld
To: ByteArray#
}}}
and these statements do not appear to be correct.
--
Ticket URL: <http://ghc.haskell.org/trac/ghc/ticket/13458#comment:14>
GHC <http://www.haskell.org/ghc/>
The Glasgow Haskell Compiler
More information about the ghc-tickets
mailing list