X-Git-Url: http://git.megacz.com/?a=blobdiff_plain;f=ghc%2FMain.hs;h=8348897bd3f83752160bbba3103e7d178cbe169a;hb=609e7ddfb10bc04762b820e70e0487ad6c514c2e;hp=4c18d268a0854a7859c6a2367d57dac758752084;hpb=c7170e8e18c97527c256469a5ebbc5c724d6a900;p=ghc-hetmet.git diff --git a/ghc/Main.hs b/ghc/Main.hs index 4c18d26..8348897 100644 --- a/ghc/Main.hs +++ b/ghc/Main.hs @@ -47,7 +47,6 @@ import Panic -- import MonadUtils ( liftIO ) -- Imports for --abi-hash -import HscTypes ( ModIface(mi_mod_hash) ) import LoadIface ( loadUserInterface ) import Module ( mkModuleName ) import Finder ( findImportedModule, cannotFindInterface ) @@ -209,7 +208,8 @@ main' postLoadMode dflags0 args flagWarnings = do case postLoadMode of ShowInterface f -> liftIO $ doShowIface dflags3 f DoMake -> doMake srcs - DoMkDependHS -> doMkDependHS (map fst srcs) + DoMkDependHS -> do doMkDependHS (map fst srcs) + GHC.printWarnings StopBefore p -> oneShot hsc_env p srcs >> GHC.printWarnings DoInteractive -> interactiveUI srcs Nothing DoEval exprs -> interactiveUI srcs $ Just $ reverse exprs @@ -407,7 +407,7 @@ data PostLoadMode | DoEval [String] -- ghc -e foo -e bar => DoEval ["bar", "foo"] | DoAbiHash -- ghc --abi-hash -doMkDependHSMode, doMakeMode, doInteractiveMode :: Mode +doMkDependHSMode, doMakeMode, doInteractiveMode, doAbiHashMode :: Mode doMkDependHSMode = mkPostLoadMode DoMkDependHS doMakeMode = mkPostLoadMode DoMake doInteractiveMode = mkPostLoadMode DoInteractive @@ -534,7 +534,7 @@ mode_flags = Supported , Flag "-abi-hash" (PassFlag (setMode doAbiHashMode)) Supported - , Flag "e" (HasArg (\s -> setMode (doEvalMode s) "-e")) + , Flag "e" (SepArg (\s -> setMode (doEvalMode s) "-e")) Supported -- -fno-code says to stop after Hsc but don't generate any code. @@ -748,7 +748,7 @@ abiHash strs = do mods <- mapM find_it (map fst strs) - let get_iface mod = loadUserInterface False (text "abiHash") mod + let get_iface modl = loadUserInterface False (text "abiHash") modl ifaces <- initIfaceCheck hsc_env $ mapM get_iface mods bh <- openBinMem (3*1024) -- just less than a block