diff options
author | David Terei <davidterei@gmail.com> | 2011-04-25 13:05:47 -0700 |
---|---|---|
committer | David Terei <davidterei@gmail.com> | 2011-06-17 18:39:23 -0700 |
commit | 45c64c1da96dc26ebc89b080dc12cfcc52a4cd68 (patch) | |
tree | 8c22db8a74da733b44d9ad9d8d7a7a6637726016 /ghc/InteractiveUI.hs | |
parent | 94434054df5633fc7aef9aad37aa26c8b2e011cd (diff) | |
download | haskell-45c64c1da96dc26ebc89b080dc12cfcc52a4cd68.tar.gz |
SafeHaskell: Disable certain ghc extensions in Safe.
This patch disables the use of some GHC extensions in
Safe mode and also the use of certain flags. Some
are disabled completely while others are only allowed
on the command line and not in source PRAGMAS.
We also check that Safe imports are indeed importing
a Safe or Trustworthy module.
Diffstat (limited to 'ghc/InteractiveUI.hs')
-rw-r--r-- | ghc/InteractiveUI.hs | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/ghc/InteractiveUI.hs b/ghc/InteractiveUI.hs index 884059aece..2d8d6ff02d 100644 --- a/ghc/InteractiveUI.hs +++ b/ghc/InteractiveUI.hs @@ -1556,10 +1556,10 @@ setCmd "" vcat (text "other dynamic, non-language, flag settings:" :map (flagSetting dflags) others) )) - where flagSetting dflags (str, f, _) + where flagSetting dflags (str, _, f, _) | dopt f dflags = text " " <> text "-f" <> text str | otherwise = text " " <> text "-fno-" <> text str - (ghciFlags,others) = partition (\(_, f, _) -> f `elem` flags) + (ghciFlags,others) = partition (\(_, _, f, _) -> f `elem` flags) DynFlags.fFlags flags = [Opt_PrintExplicitForalls ,Opt_PrintBindResult @@ -1804,7 +1804,7 @@ showLanguages = do dflags <- getDynFlags liftIO $ putStrLn $ showSDoc $ vcat $ text "active language flags:" : - [text (" -X" ++ str) | (str, f, _) <- DynFlags.xFlags, xopt f dflags] + [text (" -X" ++ str) | (str, _, f, _) <- DynFlags.xFlags, xopt f dflags] -- ----------------------------------------------------------------------------- -- Completion |