[GHC] #7018: Preprocess code before checking safety

GHC cvs-ghc at haskell.org
Thu Jun 21 03:37:30 CEST 2012


#7018: Preprocess code before checking safety
---------------------------------------+------------------------------------
 Reporter:  favonia                    |          Owner:                  
     Type:  feature request            |         Status:  new             
 Priority:  normal                     |      Component:  Compiler        
  Version:  7.4.2                      |       Keywords:                  
       Os:  Unknown/Multiple           |   Architecture:  Unknown/Multiple
  Failure:  GHC rejects valid program  |       Testcase:                  
Blockedby:                             |       Blocking:                  
  Related:                             |  
---------------------------------------+------------------------------------
 Apparently GHC checks safety (as safe Haskell) before preprocessing. This
 is sometimes undesirable; for example:

 {{{
 #if __GLASGOW_HASKELL__ >= 702
 import Foreign.Safe
 #else
 import Foreign
 #endif
 }}}

 Not sure if preprocessing will break the design of safe Haskell, but if it
 won't I hope GHC can accept this code as safe.

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



More information about the Glasgow-haskell-bugs mailing list