Skip to content

Instantly share code, notes, and snippets.

@samth
Created June 24, 2013 00:31
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save samth/5847063 to your computer and use it in GitHub Desktop.
Save samth/5847063 to your computer and use it in GitHub Desktop.
#lang typed/racket
(define: *filename* : String "")
(define: *mode* : (U 'version 'unset 'do-something-useful) 'unset)
(command-line
#:program "mysuperprogram"
#:once-any
(("-v" "--version") "Prints the version of the program"
(set! *mode* 'version))
#:once-each
(("-i" "--file") #{fname : String}
"The path to the file"
(set! *filename* fname)))
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment