From e56d87f41892845ff380e00aa9a42ce55e70eede Mon Sep 17 00:00:00 2001 From: "Paul A. Patience" Date: Sat, 12 Feb 2022 15:38:04 +0000 Subject: 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. --- stdlib/getopts.tl | 2 ++ 1 file changed, 2 insertions(+) (limited to 'stdlib') 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))) -- cgit v1.2.3