[project @ 2003-01-09 11:39:20 by simonmar]
[ghc-hetmet.git] / ghc / compiler / main / CmdLineOpts.lhs
index 94dd354..2cb7e44 100644 (file)
@@ -117,15 +117,15 @@ module CmdLineOpts (
 
 #include "HsVersions.h"
 
-import GlaExts
-import IOExts  ( IORef, readIORef, writeIORef )
 import Constants       -- Default values for some flags
 import Util
-import FastTypes
 import FastString      ( FastString, mkFastString )
 import Config
-
 import Maybes          ( firstJust )
+
+import GLAEXTS
+import DATA_IOREF      ( IORef, readIORef, writeIORef )
+import UNSAFE_IO       ( unsafePerformIO )
 \end{code}
 
 %************************************************************************
@@ -258,6 +258,7 @@ data DynFlag
    | Opt_D_dump_stix
    | Opt_D_dump_simpl_stats
    | Opt_D_dump_tc_trace
+   | Opt_D_dump_splices
    | Opt_D_dump_BCOs
    | Opt_D_dump_vect
    | Opt_D_source_stats
@@ -270,6 +271,7 @@ data DynFlag
    | Opt_DoStgLinting
    | Opt_DoUSPLinting
 
+   | Opt_WarnIsError           -- -Werror; makes warnings fatal
    | Opt_WarnDuplicateExports
    | Opt_WarnHiShadows
    | Opt_WarnIncompletePatterns
@@ -292,7 +294,9 @@ data DynFlag
    | Opt_AllowIncoherentInstances
    | Opt_NoMonomorphismRestriction
    | Opt_GlasgowExts
+   | Opt_FFI
    | Opt_PArr                         -- syntactic support for parallel arrays
+   | Opt_With                         -- deprecated keyword for implicit parms
    | Opt_Generics
    | Opt_NoImplicitPrelude 
 
@@ -333,7 +337,6 @@ data HscLang
   | HscAsm
   | HscJava
   | HscILX
-  | HscCore
   | HscInterpreted
   | HscNothing
     deriving (Eq, Show)
@@ -544,7 +547,7 @@ unpacked_opts :: [String]
 unpacked_opts =
   concat $
   map (expandAts) $
-  map _UNPK_ argv  -- NOT ARGV any more: v_Static_hsc_opts
+  map unpackFS argv  -- NOT ARGV any more: v_Static_hsc_opts
   where
    expandAts ('@':fname) = words (unsafePerformIO (readFile fname))
    expandAts l = [l]
@@ -601,7 +604,7 @@ opt_MaxWorkerArgs           = lookup_def_int "-fmax-worker-args" (10::Int)
    The Prelude, for example is compiled with '-inpackage std'
 -}
 opt_InPackage                  = case lookup_str "-inpackage=" of
-                                   Just p  -> _PK_ p
+                                   Just p  -> mkFastString p
                                    Nothing -> FSLIT("Main")    -- The package name if none is specified
 
 opt_EmitCExternDecls           = lookUp  FSLIT("-femit-extern-decls")