From eaa0e159e693ee8ac660a15cea6450402f120d5a Mon Sep 17 00:00:00 2001
From: Mark Wooding <mdw@distorted.org.uk>
Date: Mon, 12 Aug 2019 11:14:01 +0100
Subject: [PATCH] src/pset-impl.lisp: Accept `yup' and `nope' as booleans.

I may draw the line at `yarp' and `narp'.
---
 doc/syntax.tex     | 8 ++++----
 src/pset-impl.lisp | 4 ++--
 2 files changed, 6 insertions(+), 6 deletions(-)

diff --git a/doc/syntax.tex b/doc/syntax.tex
index 30fcdfb..07b7ce7 100644
--- a/doc/syntax.tex
+++ b/doc/syntax.tex
@@ -462,10 +462,10 @@ above, are as follows.
 
 \item The @|boolean| output type denotes a boolean value, which may be either
   true or false.  A value of type @|id| is considered true if it is @|true|,
-  @|t|, @|yes|, @|on|, or @|verily|; or false if it is @|false|, @|nil|,
-  @|no|, @|off|, or @|nowise|; it is erroneous to provide any other
-  identifier where a boolean value is wanted.  A value of type @|int| is
-  considered true if it is nonzero, or false if it is zero.
+  @|t|, @|yes|, @|on|, @|yup|, or @|verily|; or false if it is @|false|,
+  @|nil|, @|no|, @|off|, @|nope|, or @|nowise|; it is erroneous to provide
+  any other identifier where a boolean value is wanted.  A value of type
+  @|int| is considered true if it is nonzero, or false if it is zero.
 
 \item The @|symbol| output type denotes a Lisp symbol.
 
diff --git a/src/pset-impl.lisp b/src/pset-impl.lisp
index f5650cf..42049db 100644
--- a/src/pset-impl.lisp
+++ b/src/pset-impl.lisp
@@ -75,9 +75,9 @@
 			name (package-name package)))))))))
 
 (let ((truth-map (make-hash-table :test #'equalp)))
-  (dolist (string '("true" "t" "yes" "on" "verily"))
+  (dolist (string '("true" "t" "yes" "on" "yup" "verily"))
     (setf (gethash string truth-map) t))
-  (dolist (string '("false" "nil" "no" "off" "nowise"))
+  (dolist (string '("false" "nil" "no" "off" "nope" "nowise"))
     (setf (gethash string truth-map) nil))
   (defun truishp (string)
     "Convert STRING to a boolean."
-- 
2.11.0

