Skip to content

Instantly share code, notes, and snippets.

@yonta
Created May 6, 2014 03:23
Show Gist options
  • Save yonta/b4a105f369d0edb0be0a to your computer and use it in GitHub Desktop.
Save yonta/b4a105f369d0edb0be0a to your computer and use it in GitHub Desktop.
(* repl_test.sml *)
use "../lib/smlsharp-lib/GetOpt.sml"
use "Base.sml"
structure GO = GetOpt
datatype commandLineArgs =
Help
| Version
| ConfigFilePath of string
val options =
[
GO.DLONG ("help", GO.NOARG Help),
GO.DLONG ("version", GO.NOARG Version),
GO.DLONG ("config", GO.REQUIRED ConfigFilePath)
]
val commands = GO.getopt options
commands ["--help"]
commands ["--version"]
commands ["--config=/usr/lib"]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment