Re: [racket-users] Unable to utilize parse-command-line to build command line application

2016-10-13 Thread Ian Thomas
On Wednesday, October 12, 2016 at 3:15:11 PM UTC-4, Ian Thomas wrote: > On Wednesday, October 12, 2016 at 10:19:28 AM UTC-4, Ben Greenman wrote: > > Alright, here's something that I think does what you want. > > > > > > > > #lang racket > > > > > > (require racket/base > >  racket/cmdline) >

Re: [racket-users] Unable to utilize parse-command-line to build command line application

2016-10-12 Thread Ian Thomas
On Wednesday, October 12, 2016 at 10:19:28 AM UTC-4, Ben Greenman wrote: > Alright, here's something that I think does what you want. > > > > #lang racket > > > (require racket/base >  racket/cmdline) > > > (parse-command-line "com_line" >  ;; argv >  (current-command-line-arguments) >  ;;

Re: [racket-users] Unable to utilize parse-command-line to build command line application

2016-10-12 Thread Ben Greenman
Alright, here's something that I think does what you want. #lang racket (require racket/base racket/cmdline) (parse-command-line "com_line" ;; argv (current-command-line-arguments) ;; table `((once-each [("-i" "--input-file") ,(lambda (flag) (displayln "Using "))

Re: [racket-users] Unable to utilize parse-command-line to build command line application

2016-10-12 Thread Ian Thomas
On Wednesday, October 12, 2016 at 6:54:45 AM UTC-4, Ian Thomas wrote: > On Tuesday, October 11, 2016 at 9:50:12 PM UTC-4, Ben Greenman wrote: > > Indirect answer: could you use `command-line` instead? > > > > > > > > #lang racket/base > > (require racket/cmdline) > > > > > > (define

Re: [racket-users] Unable to utilize parse-command-line to build command line application

2016-10-12 Thread Ian Thomas
On Tuesday, October 11, 2016 at 9:50:12 PM UTC-4, Ben Greenman wrote: > Indirect answer: could you use `command-line` instead? > > > > #lang racket/base > (require racket/cmdline) > > > (define input-from (make-parameter #f)) > > > (command-line >   #:program "sample" >   #:once-each >  

Re: [racket-users] Unable to utilize parse-command-line to build command line application

2016-10-11 Thread Ben Greenman
Indirect answer: could you use `command-line` instead? #lang racket/base (require racket/cmdline) (define input-from (make-parameter #f)) (command-line #:program "sample" #:once-each [("-i" "--input-file") i "Use as the input file." (input-from i)] #:args (file) (printf "my

[racket-users] Unable to utilize parse-command-line to build command line application

2016-10-11 Thread Ian Thomas
I'm trying to add a simple command line interface to a program and receive the following error: parse-command-line: expected argument of type ; given: '((once-each (("-i" "--input\ -file") # ("Use as the input file."