*unspecified* is identifier syntax
authorAndy Wingo <wingo@pobox.com>
Fri, 18 Jun 2010 09:46:41 +0000 (11:46 +0200)
committerAndy Wingo <wingo@pobox.com>
Fri, 18 Jun 2010 09:46:41 +0000 (11:46 +0200)
* module/ice-9/boot-9.scm (*unspecified*): Define using
  identifier-syntax. Should also prevent it from being set!.
  (unspecified?): Move up.

module/ice-9/boot-9.scm

index 11de447..19c273f 100644 (file)
@@ -2656,6 +2656,20 @@ module '(ice-9 q) '(make-q q-length))}."
 
 \f
 
+;;; {The Unspecified Value}
+;;;
+;;; Currently Guile represents unspecified values via one particular value,
+;;; which may be obtained by evaluating (if #f #f). It would be nice in the
+;;; future if we could replace this with a return of 0 values, though.
+
+(define-syntax *unspecified*
+  (identifier-syntax (if #f #f)))
+
+(define (unspecified? v) (eq? v *unspecified*))
+
+
+\f
+
 ;;; {Running Repls}
 ;;;
 
@@ -2666,9 +2680,6 @@ module '(ice-9 q) '(make-q q-length))}."
 
 ;; A provisional repl that acts like the SCM repl:
 ;;
-(define *unspecified* (if #f #f))
-(define (unspecified? v) (eq? v *unspecified*))
-
 (define (default-pre-unwind-handler key . args)
   ;; Narrow by two more frames: this one, and the throw handler.
   (save-stack 2)