
#16313: Core Lint warning (Unsafe coercion: {left,right}-hand type is levity- polymorphic) -------------------------------------+------------------------------------- Reporter: RyanGlScott | Owner: (none) Type: bug | Status: new Priority: normal | Milestone: Component: Compiler | Version: 8.6.3 Resolution: | Keywords: 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 simonpj): Let me ask again Are you really arguing that if Lint sees `3# |> UnsafeCoerce(..) :: Int`, which coerces an Int# to an Int, that it should remain silent? Maybe a compiler bug put it there; it's certainly wrong isn't it? After all, if the compiler was always right we would not need Core Lint. I'm all for adding a user-level bug-detection thing for `unsafeCoerce` as well, which you are perhaps implicitly suggesting. -- Ticket URL: http://ghc.haskell.org/trac/ghc/ticket/16313#comment:5 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler