aboutsummaryrefslogtreecommitdiff
path: root/petty-types.lisp
diff options
context:
space:
mode:
authorcolin <colin@cicadas.surf>2024-09-01 08:35:26 -0700
committercolin <colin@cicadas.surf>2024-09-01 08:35:26 -0700
commitb9b7751f0c0843848cd7bafa75583e25e2edc8b8 (patch)
tree52be00233d068d0b5c691e14e4df8f961a41ec96 /petty-types.lisp
parent90ccca65b51bf591ce11bd5dbe17dea6539d5763 (diff)
Intern generated type predicate names in petty-types package
Diffstat (limited to 'petty-types.lisp')
-rw-r--r--petty-types.lisp7
1 files changed, 5 insertions, 2 deletions
diff --git a/petty-types.lisp b/petty-types.lisp
index a45e898..9f98e78 100644
--- a/petty-types.lisp
+++ b/petty-types.lisp
@@ -20,7 +20,8 @@
(check-type cont symbol "A SYMBOL")
(assert (or (eq len '*) (typep len 'fixnum)) (len) "LEN must be '* or a fixnum")
(let ((name
- (apply #'a:symbolicate cont :-of- (write-to-string len) :- (a:flatten type)))
+ (let ((*package* #.(find-package :petty-types)))
+ (apply #'a:symbolicate cont :-of- (write-to-string len) :- (a:flatten type))))
(len
(when (typep len 'fixnum)
len)))
@@ -41,7 +42,9 @@ member is the NTH member of TYPES."
"At least one member of ~s is not a type specifier"
types)
(let ((name
- (apply #'a:symbolicate :tuple- (mapcar #'write-to-string (a:flatten types)))))
+ (let ((*package* #.(find-package :petty-types)))
+ (apply #'a:symbolicate :tuple-
+ (mapcar #'write-to-string (a:flatten types))))))
(prog1 name
(unless (fboundp name)
(setf (symbol-function name)