comparison src/main.mlton.sml @ 891:8f2159040bbb

More command-line options
author Adam Chlipala <adamc@hcoop.net>
date Sat, 18 Jul 2009 11:01:48 -0400
parents 03e7f111fe99
children 36efaf119b85
comparison
equal deleted inserted replaced
890:034eeb099564 891:8f2159040bbb
39 (demo := SOME (prefix, true); 39 (demo := SOME (prefix, true);
40 doArgs rest) 40 doArgs rest)
41 | "-protocol" :: name :: rest => 41 | "-protocol" :: name :: rest =>
42 (Settings.setProtocol name; 42 (Settings.setProtocol name;
43 doArgs rest) 43 doArgs rest)
44 | "-db" :: s :: rest =>
45 (Settings.setDbstring (SOME s);
46 doArgs rest)
44 | "-dbms" :: name :: rest => 47 | "-dbms" :: name :: rest =>
45 (Settings.setDbms name; 48 (Settings.setDbms name;
46 doArgs rest) 49 doArgs rest)
47 | "-debug" :: rest => 50 | "-debug" :: rest =>
48 (Settings.setDebug true; 51 (Settings.setDebug true;
49 doArgs rest) 52 doArgs rest)
50 | "-timing" :: rest => 53 | "-timing" :: rest =>
51 (timing := true; 54 (timing := true;
55 doArgs rest)
56 | "-output" :: s :: rest =>
57 (Settings.setExe (SOME s);
58 doArgs rest)
59 | "-sql" :: s :: rest =>
60 (Settings.setSql (SOME s);
52 doArgs rest) 61 doArgs rest)
53 | arg :: rest => 62 | arg :: rest =>
54 (if size arg > 0 andalso String.sub (arg, 0) = #"-" then 63 (if size arg > 0 andalso String.sub (arg, 0) = #"-" then
55 raise Fail ("Unknown flag " ^ arg) 64 raise Fail ("Unknown flag " ^ arg)
56 else 65 else