Repository : ssh://darcs.haskell.org//srv/darcs/ghc On branch : master
http://hackage.haskell.org/trac/ghc/changeset/b558599b9e492fd6d349aa60306b788dbaf9f28c >--------------------------------------------------------------- commit b558599b9e492fd6d349aa60306b788dbaf9f28c Author: Ian Lynagh <[email protected]> Date: Wed Oct 26 17:37:27 2011 +0100 Revert "Fix some validation errors" This reverts commit 4e2121f4fa33743d0acb42506b4d34952a7e4c80. >--------------------------------------------------------------- compiler/main/DynFlags.hs | 6 ++++++ compiler/main/HscMain.lhs | 2 +- 2 files changed, 7 insertions(+), 1 deletions(-) diff --git a/compiler/main/DynFlags.hs b/compiler/main/DynFlags.hs index 537e2b4..1c047b7 100644 --- a/compiler/main/DynFlags.hs +++ b/compiler/main/DynFlags.hs @@ -1037,6 +1037,12 @@ safeLanguageOn dflags = safeHaskell dflags == Sf_Safe safeInferOn :: DynFlags -> Bool safeInferOn dflags = safeHaskell dflags == Sf_SafeInfered +-- | Turn off Safe Haskell inference mode (set module to unsafe) +setSafeInferOff :: DynFlags -> DynFlags +setSafeInferOff dflags + | safeHaskell dflags == Sf_SafeInfered = dflags { safeHaskell = Sf_None } + | otherwise = dflags + -- | Test if Safe Imports are on in some form safeImportsOn :: DynFlags -> Bool safeImportsOn dflags = safeHaskell dflags == Sf_Unsafe || diff --git a/compiler/main/HscMain.lhs b/compiler/main/HscMain.lhs index 08ae763..3961de0 100644 --- a/compiler/main/HscMain.lhs +++ b/compiler/main/HscMain.lhs @@ -904,7 +904,7 @@ checkSafeImports dflags hsc_env tcg_env -- See the Note [ Safe Haskell Inference] when (not $ isEmptyBag errs) ( -- did we fail safe inference or fail -XSafe? - case safeInferOn dflags of + case safeHaskell dflags == Sf_SafeInfered of True -> setDynFlags (dflags { safeHaskell = Sf_None } ) False -> liftIO . throwIO . mkSrcErr $ errs ) _______________________________________________ Cvs-ghc mailing list [email protected] http://www.haskell.org/mailman/listinfo/cvs-ghc
