unspecific))
unspecific)
+(define (set-dispatch-tag<=! t1 t2)
+ (defer-boot-action 'predicate-relations
+ (lambda ()
+ (set-dispatch-tag<=! t1 t2))))
+
+(define (set-predicate<=! p1 p2)
+ (defer-boot-action 'predicate-relations
+ (lambda ()
+ (set-predicate<=! p1 p2))))
+
(define (guarantee predicate object #!optional caller)
(if (predicate object)
object
(lambda ()
(set! metatag-tag (%make-tag #f 'metatag dispatch-metatag? '#()))
(%record-set! metatag-tag 0 metatag-tag)))
-
-(define (set-dispatch-tag<=! t1 t2)
- (defer-boot-action 'predicate-relations
- (lambda ()
- (set-dispatch-tag<=! t1 t2))))
\f
(define (dispatch-tag-metatag tag)
(guarantee dispatch-tag? tag 'dispatch-tag-metatag)
(define (predicate>= predicate1 predicate2)
(predicate<= predicate2 predicate1))
-(define (set-predicate<=! predicate superset)
- (set-dispatch-tag<=! (predicate->dispatch-tag predicate 'set-predicate<=!)
- (predicate->dispatch-tag superset 'set-predicate<=!)))
-
(define (dispatch-tag= tag1 tag2)
(guarantee dispatch-tag? tag1 'dispatch-tag=)
(guarantee dispatch-tag? tag2 'dispatch-tag=)
(if (dispatch-tag>= tag superset)
(error "Not allowed to create a superset loop:" tag superset))
(hash-table-clear! dispatch-tag<=-cache)))
+ (set! set-predicate<=!
+ (named-lambda (set-predicate<=! predicate superset)
+ (set-dispatch-tag<=! (predicate->dispatch-tag predicate)
+ (predicate->dispatch-tag superset))))
(run-deferred-boot-actions 'predicate-relations)))
\ No newline at end of file
(run-deferred-boot-actions 'set-predicate-tag!))))
(define (predicate-name predicate)
- (dispatch-tag-name (predicate->dispatch-tag predicate 'predicate-name)))
+ (dispatch-tag-name (predicate->dispatch-tag predicate)))
-(define (predicate->dispatch-tag predicate #!optional caller)
+(define (predicate->dispatch-tag predicate)
(let ((tag (get-predicate-tag predicate #f)))
(if (not tag)
- (error:not-a predicate? predicate caller))
+ (error:not-a predicate? predicate))
tag))
(define simple-tag-metatag)
object))
(define (predicate-tagger predicate)
- (%tag-tagger (predicate->dispatch-tag predicate 'predicate-tagger) predicate))
+ (%tag-tagger (predicate->dispatch-tag predicate) predicate))
(define (dispatch-tag-tagger tag)
(%tag-tagger tag (dispatch-tag->predicate tag)))
(if (default-object? default-inits)
(vector-cons n #f)
(list->vector default-inits)))))
+ (set-predicate<=! predicate record?)
(if (and unparser-method
(not (default-object? unparser-method)))
(define-unparser-method predicate unparser-method))
object-pure?
predicate?
register-predicate!
+ set-dispatch-tag<=!
+ set-predicate<=!
simple-parser-method
simple-unparser-method
standard-unparser-method
no-object?
predicate<=
predicate>=
- set-predicate<=!
top-dispatch-tag)
(export (runtime)
define-dispatch-tag<=))
dispatch-tag-metatag
dispatch-tag-name
dispatch-tag?
- make-dispatch-metatag
- set-dispatch-tag<=!)
+ make-dispatch-metatag)
(export (runtime predicate-lattice)
add-dispatch-tag-superset
any-dispatch-tag-superset)