[GHC] #9756: Warn about unnecessary unsafeCoerce

GHC ghc-devs at haskell.org
Mon Nov 3 07:03:24 UTC 2014


#9756: Warn about unnecessary unsafeCoerce
-------------------------------------+-------------------------------------
       Reporter:  dfeuer             |                   Owner:
           Type:  feature request    |                  Status:  new
       Priority:  normal             |               Milestone:
      Component:  Compiler (Type     |                 Version:  7.9
  checker)                           |        Operating System:
       Keywords:                     |  Unknown/Multiple
   Architecture:  Unknown/Multiple   |         Type of failure:
     Difficulty:  Unknown            |  None/Unknown
     Blocked By:                     |               Test Case:
Related Tickets:                     |                Blocking:
                                     |  Differential Revisions:
-------------------------------------+-------------------------------------
 `unsafeCoerce` has been around a lot longer than `coerce`, so older code
 tends to use it even if `coerce` could do the job. It would be nice if the
 type checker could produce a warning when it detected such a situation.

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


More information about the ghc-tickets mailing list