diff options
Diffstat (limited to 'compiler/main/DynFlags.hs')
-rw-r--r-- | compiler/main/DynFlags.hs | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/compiler/main/DynFlags.hs b/compiler/main/DynFlags.hs index 1bb39666c5..675b26e2c0 100644 --- a/compiler/main/DynFlags.hs +++ b/compiler/main/DynFlags.hs @@ -1573,7 +1573,7 @@ parseDynLibLoaderMode f d = case splitAt 8 f of ("deploy", "") -> d{ dynLibLoader = Deployable } ("sysdep", "") -> d{ dynLibLoader = SystemDependent } - _ -> ghcError (CmdLineError ("Unknown dynlib loader: " ++ f)) + _ -> throwGhcException (CmdLineError ("Unknown dynlib loader: " ++ f)) setDumpPrefixForce f d = d { dumpPrefixForce = f} @@ -1728,7 +1728,7 @@ parseDynamicFlagsFull activeFlags cmdline dflags0 args = do let ((leftover, errs, warns), dflags1) = runCmdLine (processArgs activeFlags args') dflags0 - when (not (null errs)) $ ghcError $ errorsToGhcException errs + when (not (null errs)) $ throwGhcException $ errorsToGhcException errs -- check for disabled flags in safe haskell let (dflags2, sh_warns) = safeFlagCheck cmdline dflags1 @@ -1742,7 +1742,7 @@ parseDynamicFlagsFull activeFlags cmdline dflags0 args = do } unless (allowed_combination theWays) $ - ghcError (CmdLineError ("combination not supported: " ++ + throwGhcException (CmdLineError ("combination not supported: " ++ intercalate "/" (map wayDesc theWays))) let (dflags4, consistency_warnings) = makeDynFlagsConsistent dflags3 @@ -3273,7 +3273,7 @@ makeDynFlagsConsistent dflags then let dflags' = dflags { hscTarget = HscAsm } warn = "Using native code generator rather than LLVM, as LLVM is incompatible with -fPIC and -dynamic on this platform" in loop dflags' warn - else ghcError $ CmdLineError "Can't use -fPIC or -dynamic on this platform" + else throwGhcException $ CmdLineError "Can't use -fPIC or -dynamic on this platform" | os == OSDarwin && arch == ArchX86_64 && not (gopt Opt_PIC dflags) |