Repository : ssh://darcs.haskell.org//srv/darcs/ghc On branch : master
http://hackage.haskell.org/trac/ghc/changeset/615fa14851b7ce1f58253401344430a2c2c89efc >--------------------------------------------------------------- commit 615fa14851b7ce1f58253401344430a2c2c89efc Author: David Terei <[email protected]> Date: Mon May 23 14:23:33 2011 -0700 SafeHaskell: Remove dead alternate flag check method >--------------------------------------------------------------- compiler/main/DynFlags.hs | 77 --------------------------------------------- 1 files changed, 0 insertions(+), 77 deletions(-) diff --git a/compiler/main/DynFlags.hs b/compiler/main/DynFlags.hs index 0c6c6ac..ba18f49 100644 --- a/compiler/main/DynFlags.hs +++ b/compiler/main/DynFlags.hs @@ -1269,83 +1269,6 @@ shFlagsDisallowed dflags = foldl check_method (dflags, []) bad_flags safeFailure str = [L noSrcSpan $ "Warning2: " ++ str ++ " is not allowed in" ++ " SafeHaskell; ignoring " ++ str] -{- - -- ALTERNATE SAFE HASKELL CHECK METHOD - --- | Extensions that can only be enabled on the command line when compiling in --- Safe mode -shFlagsCmdLineOnly :: Monad m => DynFlags -> DynFlags -> m () -shFlagsCmdLineOnly oldf newf = mapM_ check_method bad_flags - where - check_method (test,str) = when test $ safeFailure str - - ext_test ext = xopt ext newf && not (xopt ext oldf) - pgm_test pgm = pgm oldf == pgm newf - dyn_test dyn = dopt dyn newf && not (dopt dyn oldf) - - bad_flags = [ (ext_test Opt_TemplateHaskell, "TemplateHaskell") - , (ext_test Opt_Cpp, "CPP") - , (dyn_test Opt_Pp, "F") - - , (pgm_test pgm_lo, "pgmlo") - , (pgm_test pgm_lc, "pgmlc") - , (pgm_test pgm_L, "pgmL") - , (pgm_test pgm_P, "pgmP") - , (pgm_test pgm_F, "pgmF") - , (pgm_test pgm_c, "pgmc") - , (pgm_test pgm_m, "pgmm") - , (pgm_test pgm_s, "pgms") - , (pgm_test pgm_a, "pgma") - , (pgm_test pgm_l, "pgml") - , (pgm_test pgm_dll, "pgmdll") - , (pgm_test pgm_windres, "pgmwindres") - - , (pgm_test opt_lo, "optlo") - , (pgm_test opt_lc, "optlc") - , (pgm_test opt_L, "optL") - , (pgm_test opt_P, "optP") - , (pgm_test opt_F, "optF") - , (pgm_test opt_c, "optc") - , (pgm_test opt_m, "optm") - , (pgm_test opt_a, "opta") - , (pgm_test opt_l, "optl OR l") - , (pgm_test opt_windres, "optlwindres") - - , (pgm_test mainFunIs - && pgm_test mainModIs, "main-is") - , (pgm_test libraryPaths, "L") - , (pgm_test dynLibLoader, "dynload") - - , (pgm_test hcSuf, "hcsuf") - , (pgm_test hiSuf, "hisuf") - , (pgm_test objectSuf, "osuf") - , (pgm_test hiDir, "hidir") - , (pgm_test objectDir, "odir") - , (pgm_test stubDir, "stubdir") - , (pgm_test outputHi, "ohi") - , (pgm_test outputFile, "o") - , (pgm_test tmpDir, "tmpdir") - - , (pgm_test includePaths, "I") - - , (pgm_test rtsOpts, "with-rtsopts") - , (pgm_test rtsOptsEnabled, "rtsopts") - - , (pgm_test dylibInstallName, "dylib-install-name") - ] - --- safeFailure :: MonadIO m => String -> m () -safeFailure :: Monad m => String -> m () -safeFailure s = ghcError $ CmdLineError $ "Illegal extension (" ++ s - ++ ") in use while compiling with Safe Haskell!" -{- - -- prefer this error but circular imports arise. - = liftIO $ throwIO $ mkSrcErr $ unitBag $ mkPlainErrMsg noSrcSpan $ - text "Illegal extension (" <> text s <> - text ") in use while compiling with Safe Haskell!" --} --} - {- ********************************************************************** %* * _______________________________________________ Cvs-ghc mailing list [email protected] http://www.haskell.org/mailman/listinfo/cvs-ghc
