X-Git-Url: http://git.megacz.com/?a=blobdiff_plain;f=ghc%2Fcompiler%2Fmain%2FMain.hs;h=b0886cedbb90d9c5418ea0c534f0fb8e28f3faa9;hb=a2e3f6683cce81c5a34e5f353ff35e20754555e2;hp=6a331f7d8f4252d1a9397b36d2ed7abda647c25b;hpb=f98aaf1088d0b654ebf6c887c7dbebe5bb6f5f5f;p=ghc-hetmet.git diff --git a/ghc/compiler/main/Main.hs b/ghc/compiler/main/Main.hs index 6a331f7..b0886ce 100644 --- a/ghc/compiler/main/Main.hs +++ b/ghc/compiler/main/Main.hs @@ -1,6 +1,6 @@ {-# OPTIONS -W -fno-warn-incomplete-patterns #-} ----------------------------------------------------------------------------- --- $Id: Main.hs,v 1.7 2000/10/24 15:58:02 simonmar Exp $ +-- $Id: Main.hs,v 1.8 2000/10/24 16:08:16 simonmar Exp $ -- -- GHC Driver program -- @@ -157,21 +157,31 @@ main = _ <- processArgs static_flags more_opts [] -- give the static flags to hsc - build_hsc_opts + static_opts <- buildStaticHscOpts + writeIORef static_hsc_opts static_opts -- build the default DynFlags (these may be adjusted on a per -- module basis by OPTIONS pragmas and settings in the interpreter). core_todo <- buildCoreToDo + stg_todo <- buildStgToDo lang <- readIORef hsc_lang writeIORef v_DynFlags - DynFlags{ coreToDo = core_todo, - stgToDo = error "ToDo: stgToDo" + DynFlags{ coreToDo = core_todo, + stgToDo = stg_todo, hscLang = lang, -- leave out hscOutName for now flags = [] } + -- warnings + warn_level <- readIORef warning_opt + let warn_opts = case warn_level of + W_default -> standardWarnings + W_ -> minusWOpts + W_all -> minusWallOpts + W_not -> [] + -- the rest of the arguments are "dynamic" srcs <- processArgs dynamic_flags non_static [] -- save the "initial DynFlags" away