diff options
author | Marc Feeley <feeley@iro.umontreal.ca> | 2024-02-12 10:09:02 -0500 |
---|---|---|
committer | GitHub <noreply@github.com> | 2024-02-12 10:09:02 -0500 |
commit | 0d7e0bfbe115f2c01a7af3a50e93d10c4f2fecbb (patch) | |
tree | a65224b1a46e611194b2dcce57803035ee9b2fb8 | |
parent | 05d343f5a3a38890ec30c08b596032db3af8dd99 (diff) | |
parent | 0bc03e16b508dc226bcd49aef0e3c2ab76b06cdc (diff) |
Merge pull request #891 from mighty-gerbils/allow-type-subtyping
treat type descriptors as extensible
-rw-r--r-- | lib/_kernel.scm | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/lib/_kernel.scm b/lib/_kernel.scm index c7dfd15a..351d2295 100644 --- a/lib/_kernel.scm +++ b/lib/_kernel.scm @@ -5388,7 +5388,8 @@ end-of-code ;; ;; (define-type type ;; id: ...special-type... -;; (id unprintable: equality-test:) +;; extender: ... +;; (id unprintable:) ;; (name unprintable: equality-skip:) ;; (flags unprintable: equality-skip:) ;; (super unprintable: equality-skip:) @@ -5401,7 +5402,7 @@ end-of-code #f ;; this structure's type descriptor is itself! (set later) '##type-5 'type - '8 + '26 ;; extensible|concrete|nongenerative '#f '#(id 1 #f name 5 #f flags 5 #f super 5 #f fields 5 #f)))) (##structure-type-set! type-type type-type) ;; self reference @@ -5439,7 +5440,7 @@ end-of-code (loop super))))))) (define-prim (##type? obj) - (##structure-direct-instance-of? obj (##type-id ##type-type))) + (##structure-instance-of? obj (##type-id ##type-type))) (define-prim (##structure-type obj) (##vector-ref obj 0)) |