Export some predicates.
authorJoe Marshall <eval.apply@gmail.com>
Fri, 25 Feb 2011 20:58:30 +0000 (12:58 -0800)
committerJoe Marshall <eval.apply@gmail.com>
Fri, 25 Feb 2011 20:58:30 +0000 (12:58 -0800)
src/runtime/lambda-list.scm
src/runtime/runtime.pkg

index d58e45ee72ddac79691aeb8042018412a9cd89a2..8a8a76e557c30ca2b39cba054f22f3b0a7477691 100644 (file)
@@ -123,6 +123,26 @@ USA.
 (define lambda-tag:rest (object-new-type (ucode-type constant) 4))
 (define lambda-tag:key (object-new-type (ucode-type constant) 5))
 (define lambda-tag:aux (object-new-type (ucode-type constant) 8))
+
+(define (lambda-tag? object)
+  (or (eq? object lambda-tag:aux)
+      (eq? object lambda-tag:key)
+      (eq? object lambda-tag:optional)
+      (eq? object lambda-tag:rest)
+
+      ;; The following ones are called `lambda-tag', but they are
+      ;; semantically quite different from lambda list keywords.
+      ;; This should be fixed some day.
+
+      ;; From lambda.scm
+      (eq? object lambda-tag:internal-lambda)
+      (eq? object lambda-tag:internal-lexpr)
+
+      ;; From syntax-output.scm
+      (eq? object lambda-tag:fluid-let)
+      (eq? object lambda-tag:let)
+      (eq? object lambda-tag:unnamed)
+      ))
 \f
 (define (parse-mit-lambda-list lambda-list)
   (let ((required (list '()))
index 008a5b9baec4bed8d8955593a997750db2a7b691..3537ad6fd1225f747c1517d232c736361af8a925 100644 (file)
@@ -2104,6 +2104,7 @@ USA.
          hash-table-fold
          hash-table-merge!
          hash-table-ref
+         hash-table-type?
          hash-table-update!
          hash-table/clean!
          hash-table/clear!
@@ -2415,6 +2416,9 @@ USA.
   (export (runtime compiler-info)
          lambda-tag:internal-lambda
          lambda-tag:internal-lexpr)
+  (export (runtime lambda-list)
+         lambda-tag:internal-lambda
+         lambda-tag:internal-lexpr)
   (initialization (initialize-package!)))
 
 (define-package (runtime list)
@@ -2619,6 +2623,7 @@ USA.
          lambda-tag:key
          lambda-tag:optional
          lambda-tag:rest
+         lambda-tag?
          map-mit-lambda-list
          map-r4rs-lambda-list
          mit-lambda-list?
@@ -3797,6 +3802,7 @@ USA.
          graphics-set-drawing-mode
          graphics-set-line-style
          graphics-type
+         (graphics-type? graphics-device-type?)
          graphics-type-available?
          graphics-type-name
          graphics-type-properties