|
From: | Matt Wette |
Subject: | Re: Parsing command line arguments, predicate error |
Date: | Sun, 8 Jul 2018 08:44:22 -0700 |
User-agent: | Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.8.0 |
On 07/08/2018 04:49 AM, Zelphir Kaltstahl wrote:
Hi! I decided to take a look at how one can parse command line arguments in Guile and was looking for something like argparse in Python. It seems that (use-modules (ice-9 getopt-long)) does the job, except that I hit one problem and don't know what the mistake I am making is. It seems to be connected to the usage of `predicate` in my code.
You probably want to use quasi-quote + unquote: `((version ... (predicate ,string-exact-integer?))))I believe the module (srfi srfi-37), args-fold, is now recommended over getopt-long.
Matt
[Prev in Thread] | Current Thread | [Next in Thread] |