Add support for #:ps argument in command-line.

This commit is contained in:
Vincent St-Amour 2017-05-18 15:50:18 -05:00
parent adb806a7e5
commit c0af5235d2
2 changed files with 15 additions and 1 deletions

View File

@ -3033,7 +3033,8 @@
(-polydots (b a)
(cl->* (-Pathlike
(Un (-lst -String) (-vec -String))
(-lst (-pair mode-sym (-lst (-lst Univ))))
(-lst (Un (-pair mode-sym (-lst (-lst Univ)))
(-pair (-val 'ps) (-lst -String))))
((list Univ) [a a] . ->... . b)
(-lst -String)
. -> . b))))]

View File

@ -0,0 +1,13 @@
#lang typed/racket
(define *message* : (Parameterof (Listof String)) (make-parameter '()))
(define *verbose* : (Parameterof Boolean) (make-parameter #f))
(define (parse-cmdline)
(command-line
#:program "q"
#:once-each
[("-v" "--verbose") "verbose mode" (*verbose* #t)]
#:ps "foo bar" ; <---- causing type error
#:args #{msg : String} (*message* msg)))