
#14561: Panic on levity polymorphic very unsafe coerce -------------------------------------+------------------------------------- Reporter: goldfire | Owner: (none) Type: bug | Status: new Priority: normal | Milestone: Component: Compiler | Version: 8.3 Resolution: | Keywords: | LevityPolymorphism Operating System: Unknown/Multiple | Architecture: | Unknown/Multiple Type of failure: None/Unknown | Test Case: Blocked By: | Blocking: Related Tickets: | Differential Rev(s): Wiki Page: | -------------------------------------+------------------------------------- Comment (by simonmar): There are lots of `unsafeCoerce#` in the GHCi debugger (`RtClosureInspect`) where we need to coerce unknown but pointed types into unpointed types like `MutVar#`. There's another instance of this kind of coercion in `newStablePtrPrimMVar` in base. I don't know of any places where we legitimately coerce between boxed and unboxed types, but I think it would be nice if we could retain the ability to do so, for debugging (e.g. printing out pointer values) & general hacking purposes. -- Ticket URL: http://ghc.haskell.org/trac/ghc/ticket/14561#comment:4 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler