Commit 4e2121f4 authored by dterei's avatar dterei

Fix some validation errors

parent 1d6c2cf9
......@@ -1037,12 +1037,6 @@ 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 ||
......
......@@ -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 safeHaskell dflags == Sf_SafeInfered of
case safeInferOn dflags of
True -> setDynFlags (dflags { safeHaskell = Sf_None } )
False -> liftIO . throwIO . mkSrcErr $ errs
)
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment