summaryrefslogtreecommitdiff
path: root/src/main.mlton.sml
diff options
context:
space:
mode:
authorGravatar Adam Chlipala <adamc@hcoop.net>2010-01-12 11:07:39 -0500
committerGravatar Adam Chlipala <adamc@hcoop.net>2010-01-12 11:07:39 -0500
commita91077596a525b0456a2c234df4a7b0cd1c6ff9f (patch)
treee3f2eab582c8634cefeb2698d79930f02115505e /src/main.mlton.sml
parentb7b292f806c4e26b23ede86c5ee3167f62148867 (diff)
-path and -root command-line flags
Diffstat (limited to 'src/main.mlton.sml')
-rw-r--r--src/main.mlton.sml8
1 files changed, 7 insertions, 1 deletions
diff --git a/src/main.mlton.sml b/src/main.mlton.sml
index 42f05259..9cf5064a 100644
--- a/src/main.mlton.sml
+++ b/src/main.mlton.sml
@@ -1,4 +1,4 @@
-(* Copyright (c) 2008, Adam Chlipala
+(* Copyright (c) 2008-2010, Adam Chlipala
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
@@ -66,6 +66,12 @@ fun doArgs args =
| "-static" :: rest =>
(Settings.setStaticLinking true;
doArgs rest)
+ | "-path" :: name :: path :: rest =>
+ (Compiler.addPath (name, path);
+ doArgs rest)
+ | "-root" :: name :: root :: rest =>
+ (Compiler.addModuleRoot (root, name);
+ doArgs rest)
| arg :: rest =>
(if size arg > 0 andalso String.sub (arg, 0) = #"-" then
raise Fail ("Unknown flag " ^ arg)