{-# OPTIONS -fno-warn-incomplete-patterns #-}
-----------------------------------------------------------------------------
--- $Id: Main.hs,v 1.52 2001/02/13 17:13:39 sewardj Exp $
+-- $Id: Main.hs,v 1.54 2001/02/20 11:04:42 simonmar Exp $
--
-- GHC Driver program
--
static_opts <- buildStaticHscOpts
writeIORef v_Static_hsc_opts static_opts
- -- warnings
- warn_level <- readIORef v_Warning_opt
-
- let warn_opts = case warn_level of
- W_default -> standardWarnings
- W_ -> minusWOpts
- W_all -> minusWallOpts
- W_not -> []
-
-- build the default DynFlags (these may be adjusted on a per
-- module basis by OPTIONS pragmas and settings in the interpreter).
}
-- the rest of the arguments are "dynamic"
- srcs <- processArgs dynamic_flags (way_non_static ++
- non_static ++ warn_opts) []
+ srcs <- processArgs dynamic_flags (way_non_static ++ non_static) []
-- save the "initial DynFlags" away
init_dyn_flags <- readIORef v_DynFlags
writeIORef v_InitDynFlags init_dyn_flags
beginInteractive = throwDyn (OtherError "not built for interactive use")
#else
beginInteractive fileish_args
- = do let is_libraryish nm
+ = do minus_ls <- readIORef v_Cmdline_libraries
+ let is_libraryish nm
= let nmr = map toLower (reverse nm)
- in take 2 nmr == "o." ||
- take 3 nmr == "os." ||
- take 4 nmr == "lld."
- libs = filter is_libraryish fileish_args
+ in take 2 nmr == "o."
+ libs = map Left (filter is_libraryish fileish_args)
+ ++ map Right minus_ls
mods = filter (not.is_libraryish) fileish_args
mod = case mods of
[] -> Nothing