[GHC] #5988: Safe Haskell doesn't report all reasons why safe inference fails

GHC cvs-ghc at haskell.org
Wed Apr 4 02:30:49 CEST 2012


#5988: Safe Haskell doesn't report all reasons why safe inference fails
-----------------------------------------------+----------------------------
 Reporter:  dterei                             |          Owner:  dterei          
     Type:  bug                                |         Status:  new             
 Priority:  normal                             |      Component:  Compiler        
  Version:  7.4.1                              |       Keywords:                  
       Os:  Unknown/Multiple                   |   Architecture:  Unknown/Multiple
  Failure:  Incorrect warning at compile-time  |       Testcase:                  
Blockedby:                                     |       Blocking:                  
  Related:                                     |  
-----------------------------------------------+----------------------------
 When using `-fwarn-unsafe` to report why safe inference has failed Safe
 Haskell doesn't report bad language extensions.

 e.g this program is unsafe due to the use of Template Haskell:
 {{{
 {-# LANGUAGE TemplateHaskell #-}
 {-# OPTIONS_GHC -fwarn-unsafe #-}
 module A where

 a :: Int
 a = 1
 }}}

 but the output is:
 {{{
 UnsafeInfered.hs:2:16: Warning:
     `UnsafeInfered' has been infered as unsafe!
     Reason:
 }}}

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



More information about the Glasgow-haskell-bugs mailing list