Add GUARANTEE-INTEGRATION-INFO.
authorJoe Marshall <jmarshall@alum.mit.edu>
Tue, 2 Mar 2010 16:26:38 +0000 (08:26 -0800)
committerJoe Marshall <jmarshall@alum.mit.edu>
Tue, 2 Mar 2010 16:26:38 +0000 (08:26 -0800)
src/sf/object.scm

index 26b5a10e14e682c5c0e72435482ea2d5013a8105..a4c32a2ab7a38adeaa572b8d4d1e9aa5279a0af8 100644 (file)
@@ -284,7 +284,7 @@ USA.
         (and (constant? operator)
              (let ((operator-value (constant/value operator)))
                (and (memq operator-value primitive-boolean-predicates)
-                    (procedure-arity-valid? 
+                    (procedure-arity-valid?
                      operator-value
                      (length (combination/operands expression)))))))))
 
@@ -640,21 +640,25 @@ USA.
   (vector-ref dispatch-vector
              (enumeration/name->index enumeration/expression name)))
 
-(define-integrable (constant->integration-info constant)
-  (make-integration-info (constant/make #f constant)))
+;;; Integration Info
+(define integration-info-tag
+  (string-copy "integration-info"))
+
+(define-integrable (make-integration-info expression)
+  (cons integration-info-tag expression))
 
 (define-integrable (integration-info? object)
   (and (pair? object)
        (eq? integration-info-tag (car object))))
 
-(define-integrable (make-integration-info expression)
-  (cons integration-info-tag expression))
+(define-guarantee integration-info "Integration info")
 
-(define-integrable (integration-info/expression integration-info)
+(define (integration-info/expression integration-info)
+  (guarantee-integration-info integration-info 'integration-info/expression)
   (cdr integration-info))
 
-(define integration-info-tag
-  (string-copy "integration-info"))
+(define-integrable (constant->integration-info constant)
+  (make-integration-info (constant/make #f constant)))
 \f
 ;;; Returns #T if switch is not #F or 'warn.
 ;;; Additionally, prints text if switch is not #T.