[GHC] #7453: unsafe coerce without extensions

GHC cvs-ghc at haskell.org
Tue Nov 27 19:10:55 CET 2012


#7453: unsafe coerce without extensions
----------------------------------------+-----------------------------------
Reporter:  guest                        |          Owner:                         
    Type:  bug                          |         Status:  new                    
Priority:  normal                       |      Component:  Compiler (Type checker)
 Version:  7.6.1                        |       Keywords:                         
      Os:  Unknown/Multiple             |   Architecture:  Unknown/Multiple       
 Failure:  GHC accepts invalid program  |      Blockedby:                         
Blocking:                               |        Related:                         
----------------------------------------+-----------------------------------
Changes (by ekmett):

 * cc: ekmett@… (added)


Comment:

 z can be simplified

 {{{
 let unsafeCoerce v = z where z :: v; z = v where aux = const v
 }}}

 Note: this doesn't happen if you use {{{aux _ = v}}}

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



More information about the Glasgow-haskell-bugs mailing list