aboutsummaryrefslogtreecommitdiff
path: root/module
diff options
context:
space:
mode:
authorHugo Hörnquist <hugo@lysator.liu.se>2023-10-16 19:03:02 +0200
committerHugo Hörnquist <hugo@lysator.liu.se>2023-10-16 19:03:02 +0200
commitb305116d15d9b809ee0601261565cc354cde88bc (patch)
treec3af05ee77ed2f6ff4b647ebb95f86e93b6b93a2 /module
parentUpdate number of tests. (diff)
downloadcalp-b305116d15d9b809ee0601261565cc354cde88bc.tar.gz
calp-b305116d15d9b809ee0601261565cc354cde88bc.tar.xz
Move `false?` to type module.
Diffstat (limited to 'module')
-rw-r--r--module/hnh/util/type.scm6
-rw-r--r--module/vcomponent/base.scm4
2 files changed, 7 insertions, 3 deletions
diff --git a/module/hnh/util/type.scm b/module/hnh/util/type.scm
index 800834e5..7e1c5a3d 100644
--- a/module/hnh/util/type.scm
+++ b/module/hnh/util/type.scm
@@ -2,6 +2,7 @@
:use-module ((srfi srfi-1) :select (every))
:export (build-validator-body
list-of pair-of
+ false?
typecheck
current-procedure-name))
@@ -44,3 +45,8 @@
(list (quote variable) (quote type-clause) variable)
#f)))))
+;;; For use in typechecks, since
+;;; (or false? integer?)
+;;; is much clearer than
+;;; (or not integer?)
+(define false? not)
diff --git a/module/vcomponent/base.scm b/module/vcomponent/base.scm
index df47a5f5..2a607fc5 100644
--- a/module/vcomponent/base.scm
+++ b/module/vcomponent/base.scm
@@ -3,6 +3,7 @@
:use-module (srfi srfi-1)
:use-module (srfi srfi-17)
:use-module (srfi srfi-88)
+ :use-module ((hnh util type) :select (false?))
:use-module (hnh util object)
:use-module (hnh util lens)
:use-module (hnh util table)
@@ -87,9 +88,6 @@
(serialize-vcomponent c)
p))
-
-(define false? not)
-
(define-type (vcomponent printer: print-vcomponent)
(type type: symbol?)
(vcomponent-children