[GHC] #13458: Panic with unsafeCoerce and -dcore-lint

GHC ghc-devs at haskell.org
Mon Mar 20 19:32:35 UTC 2017


#13458: Panic with unsafeCoerce and -dcore-lint
-------------------------------------+-------------------------------------
        Reporter:  dfeuer            |                Owner:  goldfire
            Type:  bug               |               Status:  new
        Priority:  normal            |            Milestone:  8.2.1
       Component:  Compiler (Type    |              Version:  8.1
  checker)                           |
      Resolution:                    |             Keywords:
Operating System:  Unknown/Multiple  |         Architecture:
 Type of failure:  Compile-time      |  Unknown/Multiple
  crash or panic                     |            Test Case:
      Blocked By:                    |             Blocking:
 Related Tickets:                    |  Differential Rev(s):
       Wiki Page:                    |
-------------------------------------+-------------------------------------

Comment (by dfeuer):

 One thought: we currently have a rule that no variable can have a levity-
 polymorphic type, but that doesn't seem quite strong enough in the
 presence of `unsafeCoerce`. One option might be to decree that a levity-
 polymorphic type can't occur in negative position in the signature of a
 binding. That is, I think we should likely reject the ''signature'' of
 `unsafeCoerce'` altogether.

--
Ticket URL: <http://ghc.haskell.org/trac/ghc/ticket/13458#comment:5>
GHC <http://www.haskell.org/ghc/>
The Glasgow Haskell Compiler


More information about the ghc-tickets mailing list