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 /compiler/main/DriverPipeline.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 'compiler/main/DriverPipeline.hs')
-rw-r--r-- | compiler/main/DriverPipeline.hs | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/compiler/main/DriverPipeline.hs b/compiler/main/DriverPipeline.hs index afbd03e2c7..4eca8706e1 100644 --- a/compiler/main/DriverPipeline.hs +++ b/compiler/main/DriverPipeline.hs @@ -754,7 +754,7 @@ runPhase (Cpp sf) input_fn dflags0 = do src_opts <- io $ getOptionsFromFile dflags0 input_fn (dflags1, unhandled_flags, warns) - <- io $ parseDynamicNoPackageFlags dflags0 src_opts + <- io $ parseDynamicFilePragma dflags0 src_opts setDynFlags dflags1 io $ checkProcessArgsResult unhandled_flags @@ -772,7 +772,7 @@ runPhase (Cpp sf) input_fn dflags0 -- See #2464,#3457 src_opts <- io $ getOptionsFromFile dflags0 output_fn (dflags2, unhandled_flags, warns) - <- io $ parseDynamicNoPackageFlags dflags0 src_opts + <- io $ parseDynamicFilePragma dflags0 src_opts io $ checkProcessArgsResult unhandled_flags unless (dopt Opt_Pp dflags2) $ io $ handleFlagWarnings dflags2 warns -- the HsPp pass below will emit warnings @@ -806,7 +806,7 @@ runPhase (HsPp sf) input_fn dflags -- re-read pragmas now that we've parsed the file (see #3674) src_opts <- io $ getOptionsFromFile dflags output_fn (dflags1, unhandled_flags, warns) - <- io $ parseDynamicNoPackageFlags dflags src_opts + <- io $ parseDynamicFilePragma dflags src_opts setDynFlags dflags1 io $ checkProcessArgsResult unhandled_flags io $ handleFlagWarnings dflags1 warns |