[project @ 2002-03-04 17:01:26 by simonmar]
[ghc-hetmet.git] / ghc / compiler / main / DriverFlags.hs
index 8927080..ec885f9 100644 (file)
@@ -1,7 +1,7 @@
 {-# OPTIONS -#include "hschooks.h" #-}
 
 -----------------------------------------------------------------------------
--- $Id: DriverFlags.hs,v 1.84 2002/01/04 16:02:04 simonmar Exp $
+-- $Id: DriverFlags.hs,v 1.87 2002/03/04 17:01:30 simonmar Exp $
 --
 -- Driver flags
 --
@@ -19,6 +19,8 @@ module DriverFlags (
 #include "HsVersions.h"
 #include "../includes/config.h"
 
+import BinIface                ( compileIface )
+import MkIface         ( showIface )
 import DriverState
 import DriverPhases
 import DriverUtil
@@ -163,6 +165,12 @@ static_flags =
   ,  ( "-numeric-version", NoArg (do putStrLn cProjectVersion
                                     exitWith ExitSuccess))
 
+      ------- interfaces ----------------------------------------------------
+  ,  ( "-show-iface"     , HasArg (\f -> do showIface f
+                                           exitWith ExitSuccess))
+  ,  ( "-compile-iface"  , HasArg (\f -> do compileIface f
+                                           exitWith ExitSuccess))
+
       ------- verbosity ----------------------------------------------------
   ,  ( "n"              , NoArg setDryRun )
 
@@ -198,6 +206,7 @@ static_flags =
   ,  ( "gransim"       , NoArg (addNoDups v_Ways       WayGran) )
   ,  ( "smp"           , NoArg (addNoDups v_Ways       WaySMP) )
   ,  ( "debug"         , NoArg (addNoDups v_Ways       WayDebug) )
+  ,  ( "ndp"           , NoArg (addNoDups v_Ways       WayNDP) )
        -- ToDo: user ways
 
        ------ Debugging ----------------------------------------------------
@@ -267,7 +276,17 @@ static_flags =
   ,  ( "syslib"         , HasArg (addPackage) )        -- for compatibility w/ old vsns
 
         ------- Specific phases  --------------------------------------------
-  ,  ( "pgm"           , HasArg setPgm )
+  ,  ( "pgmP"           , HasArg setPgmP )
+  ,  ( "pgmF"           , HasArg setPgmF )
+  ,  ( "pgmc"           , HasArg setPgmc )
+  ,  ( "pgmm"           , HasArg setPgmm )
+  ,  ( "pgms"           , HasArg setPgms )
+  ,  ( "pgma"           , HasArg setPgma )
+  ,  ( "pgml"           , HasArg setPgml )
+#ifdef ILX
+  ,  ( "pgmI"           , HasArg setPgmI )
+  ,  ( "pgmi"           , HasArg setPgmi )
+#endif
 
   ,  ( "optdep"                , HasArg (add v_Opt_dep) )
   ,  ( "optl"          , HasArg (add v_Opt_l) )
@@ -393,6 +412,7 @@ dynamic_flags = [
   ,  ( "ddump-hi-diffs",         NoArg (setDynFlag Opt_D_dump_hi_diffs) )
   ,  ( "ddump-hi",               NoArg (setDynFlag Opt_D_dump_hi) )
   ,  ( "ddump-minimal-imports",  NoArg (setDynFlag Opt_D_dump_minimal_imports) )
+  ,  ( "ddump-vect",            NoArg (setDynFlag Opt_D_dump_vect) )
   ,  ( "dcore-lint",            NoArg (setDynFlag Opt_DoCoreLinting) )
   ,  ( "dstg-lint",             NoArg (setDynFlag Opt_DoStgLinting) )
   ,  ( "dusagesp-lint",                 NoArg (setDynFlag Opt_DoUSPLinting) )
@@ -418,6 +438,8 @@ dynamic_flags = [
 
        -- "active negatives"
   ,  ( "fno-implicit-prelude",  NoArg (setDynFlag Opt_NoImplicitPrelude) )
+  ,  ( "fno-monomorphism-restriction", 
+                       NoArg (setDynFlag Opt_NoMonomorphismRestriction) )
 
        -- the rest of the -f* and -fno-* flags
   ,  ( "fno-",                 PrefixPred (\f -> isFFlag f) (\f -> unSetDynFlag (getFFlag f)) )
@@ -442,6 +464,7 @@ fFlags = [
   ( "warn-unused-matches",             Opt_WarnUnusedMatches ),
   ( "warn-deprecations",               Opt_WarnDeprecations ),
   ( "glasgow-exts",                    Opt_GlasgowExts ),
+  ( "parr",                            Opt_PArr ),
   ( "allow-overlapping-instances",     Opt_AllowOverlappingInstances ),
   ( "allow-undecidable-instances",     Opt_AllowUndecidableInstances ),
   ( "allow-incoherent-instances",      Opt_AllowIncoherentInstances ),