-{-# OPTIONS -#include "hschooks.h" #-}
-
-----------------------------------------------------------------------------
--- $Id: DriverFlags.hs,v 1.87 2002/03/04 17:01:30 simonmar Exp $
+-- $Id: DriverFlags.hs,v 1.93 2002/05/11 10:02:22 panne Exp $
--
-- Driver flags
--
#include "HsVersions.h"
#include "../includes/config.h"
-import BinIface ( compileIface )
import MkIface ( showIface )
import DriverState
import DriverPhases
arg_ok (NoArg _) rest arg = null rest
arg_ok (HasArg _) rest arg = True
arg_ok (SepArg _) rest arg = null rest
-arg_ok (Prefix _) rest arg = not (null rest)
-arg_ok (PrefixPred p _) rest arg = not (null rest) && p rest
+arg_ok (Prefix _) rest arg = notNull rest
+arg_ok (PrefixPred p _) rest arg = notNull rest && p rest
arg_ok (OptPrefix _) rest arg = True
arg_ok (PassFlag _) rest arg = null rest
arg_ok (AnySuffix _) rest arg = True
------- interfaces ----------------------------------------------------
, ( "-show-iface" , HasArg (\f -> do showIface f
exitWith ExitSuccess))
- , ( "-compile-iface" , HasArg (\f -> do compileIface f
- exitWith ExitSuccess))
------- verbosity ----------------------------------------------------
, ( "n" , NoArg setDryRun )
-- -fno-* pattern below doesn't work. We therefore allow
-- certain optimisation passes to be turned off explicitly:
, ( "fno-strictness" , NoArg (writeIORef v_Strictness False) )
-#ifdef DEBUG
- , ( "fno-cpr" , NoArg (writeIORef v_CPR False) )
-#endif
, ( "fno-cse" , NoArg (writeIORef v_CSE False) )
-- All other "-fno-<blah>" options cancel out "-f<blah>" on the hsc cmdline
, ( "fvia-c", NoArg (setLang HscC) )
, ( "fvia-C", NoArg (setLang HscC) )
, ( "filx", NoArg (setLang HscILX) )
+ , ( "fcore", NoArg (setLang HscCore) )
-- "active negatives"
, ( "fno-implicit-prelude", NoArg (setDynFlag Opt_NoImplicitPrelude) )