diff options
author | Paul A. Patience <paul@apatience.com> | 2022-02-12 15:38:04 +0000 |
---|---|---|
committer | Kaz Kylheku <kaz@kylheku.com> | 2022-02-12 14:08:11 -0800 |
commit | e56d87f41892845ff380e00aa9a42ce55e70eede (patch) | |
tree | f7c6443cf08792d8207d69e464854a658fa51d65 /stdlib/getopts.tl | |
parent | 8cc78a0c7b82ac3d4f07a00bb10dad3d8645b9d4 (diff) | |
download | txr-e56d87f41892845ff380e00aa9a42ce55e70eede.tar.gz txr-e56d87f41892845ff380e00aa9a42ce55e70eede.tar.bz2 txr-e56d87f41892845ff380e00aa9a42ce55e70eede.zip |
getopts: forbid :bool in list/cumul types.
* stdlib/getopts.tl (list-type-p): Return nil if subtype is :bool.
(cumul-type-p): Same.
* txr.1: Documented, reworded some sentences, fixed some typos.
Diffstat (limited to 'stdlib/getopts.tl')
-rw-r--r-- | stdlib/getopts.tl | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/stdlib/getopts.tl b/stdlib/getopts.tl index fcfa8ea8..aa6ba4ab 100644 --- a/stdlib/getopts.tl +++ b/stdlib/getopts.tl @@ -73,12 +73,14 @@ (defmeth opt-desc list-type-p (me type) (tree-case type ((indicator btype) (and (eq indicator 'list) + (neq btype :bool) me.(basic-type-p btype))) (x nil))) (defmeth opt-desc cumul-type-p (me type) (tree-case type ((indicator btype) (and (eq indicator 'usr:cumul) + (neq btype :bool) (or me.(basic-type-p btype) me.(list-type-p btype)))) (x nil))) |