[MLton-devel] cvs commit: -expert option

Stephen Weeks sweeks@users.sourceforge.net
Fri, 22 Nov 2002 09:46:56 -0800


sweeks      02/11/22 09:46:56

  Modified:    mlton/main main.sml
  Log:
  Added expert option: -expert {false|true}
  
  Right now, its only purpose is to control whether or not expert
  command-line options are printed.  I didn't like the fact that before,
  just by using -v, if someone had an error in some other option, they
  would see all the expert options.
  
  Now, in order to see the expert options, you must use -expert true, as
  in:
  
  	mlton -expert true -z

Revision  Changes    Path
1.95      +5 -4      mlton/mlton/main/main.sml

Index: main.sml
===================================================================
RCS file: /cvsroot/mlton/mlton/mlton/main/main.sml,v
retrieving revision 1.94
retrieving revision 1.95
diff -u -r1.94 -r1.95
--- main.sml	22 Nov 2002 17:21:22 -0000	1.94
+++ main.sml	22 Nov 2002 17:46:55 -0000	1.95
@@ -37,6 +37,7 @@
 
 val buildConstants: bool ref = ref false
 val coalesce: int option ref = ref NONE
+val expert: bool ref = ref false
 val gcc: string ref = ref "<unset>"
 val gccSwitches : string ref = ref ""
 val includeDirs: string list ref = ref []
@@ -116,6 +117,9 @@
        (Normal, "exn-history", " {false|true}",
 	"enable Exn.history",
 	boolRef Control.exnHistory),
+       (Expert, "expert", " {false|true}",
+	"enable expert status",
+	boolRef expert),
        (Expert, "gc-check", " {limit|first|every}", "force GCs",
 	SpaceString (fn s =>
 		     gcCheck :=
@@ -287,16 +291,13 @@
        {arg = arg, desc = desc, name = name, opt = opt, style = style})
    end
 
-fun showExpert () = let open Control
-		    in !verbosity <> Silent
-		    end
 val mainUsage =
    "mlton [option ...] file.{cm|sml|c|o} [file.{S|o} ...] [library ...]"
 
 val {parse, usage} =
    Popt.makeUsage {mainUsage = mainUsage,
 		   makeOptions = makeOptions,
-		   showExpert = showExpert}
+		   showExpert = fn () => !expert}
 
 val usage = fn s => (usage s; raise Fail "unreachable")
    





-------------------------------------------------------
This sf.net email is sponsored by:ThinkGeek
Welcome to geek heaven.
http://thinkgeek.com/sf
_______________________________________________
MLton-devel mailing list
MLton-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/mlton-devel