on master help sign in
reorder things and make the help flag nicer
commitd6c8ecd454fd66a7aefd86c09e4eee27c33a6c45 authorEvan Czaplicki <info@elm-lang.org> dateSun 29 Sep 2013, 17:37 (13 years ago) parentf72e97a
1 file changed+13−11
compiler/Compiler.hs+13−11
compiler/Compiler.hs+13−11
@@ -46,27 +46,29 @@ data Flags =
4646 deriving (Data,Typeable,Show,Eq)
4747
4848flags = Flags
49− { make = False
49+ { files = def &= args &= typ "FILES"
50+ , make = False
5051 &= help "automatically compile dependencies."
51− , files = def &= args &= typ "FILES"
52− , runtime = Nothing &= typFile
53− &= help "Specify a custom location for Elm's runtime system."
5452 , only_js = False
5553 &= help "Compile only to JavaScript."
56− , print_types = False
57− &= help "Print out infered types of top-level definitions."
58− , print_program = False
59− &= help "Print out an internal representation of a program."
60− , scripts = [] &= typFile
61− &= help "Load JavaScript files in generated HTML. Files will be included in the given order."
6254 , no_prelude = False
6355 &= help "Do not import Prelude by default, used only when compiling standard libraries."
56+ , scripts = [] &= typFile
57+ &= help "Load JavaScript files in generated HTML. Files will be included in the given order."
58+ , runtime = Nothing &= typFile
59+ &= help "Specify a custom location for Elm's runtime system."
6460 , cache_dir = "cache" &= typFile
6561 &= help "Directory for files cached to make builds faster. Defaults to cache/ directory."
6662 , build_dir = "build" &= typFile
6763 &= help "Directory for generated HTML and JS files. Defaults to build/ directory."
64+ , print_types = False
65+ &= help "Print out infered types of top-level definitions."
66+ , print_program = False
67+ &= help "Print out an internal representation of a program."
6868 } &= help "Compile Elm programs to HTML, CSS, and JavaScript."
69− &= summary ("The Elm Compiler " ++ showVersion version ++ ", (c) Evan Czaplicki")
69+ &= helpArg [explicit, name "help", name "h"]
70+ &= versionArg [explicit, name "version", name "v", summary (showVersion version)]
71+ &= summary ("The Elm Compiler " ++ showVersion version ++ ", (c) Evan Czaplicki 2011-2013")
7072
7173main :: IO ()
7274main = do setNumCapabilities =<< getNumProcessors