[GHC] #9122: Make Lint check for bad uses of `unsafeCoerce`
GHC
ghc-devs at haskell.org
Mon May 19 15:14:28 UTC 2014
#9122: Make Lint check for bad uses of `unsafeCoerce`
-------------------------------------+------------------------------------
Reporter: simonpj | Owner:
Type: bug | Status: new
Priority: normal | Milestone:
Component: Compiler | Version: 7.8.2
Resolution: | Keywords:
Operating System: Unknown/Multiple | Architecture: Unknown/Multiple
Type of failure: None/Unknown | Difficulty: Unknown
Test Case: | Blocked By:
Blocking: | Related Tickets:
-------------------------------------+------------------------------------
Comment (by simonpj):
The rules are documented with `unsafeCoerce`,
[http://www.haskell.org/ghc/docs/latest/html/libraries/ghc-prim-0.3.1.0
/GHC-Prim.html#v:unsafeCoerce-35- here].
It's pretty much guaranteed that coercing from, say `Int#` to `Int` will
give rise to serious problems.
Simon
--
Ticket URL: <http://ghc.haskell.org/trac/ghc/ticket/9122#comment:2>
GHC <http://www.haskell.org/ghc/>
The Glasgow Haskell Compiler
More information about the ghc-tickets
mailing list