letrec-value no longer errors if a binding is a trivial closure.
authorGuillermo J. Rozas <edu/mit/csail/zurich/gjr>
Sun, 1 Apr 1990 22:24:35 +0000 (22:24 +0000)
committerGuillermo J. Rozas <edu/mit/csail/zurich/gjr>
Sun, 1 Apr 1990 22:24:35 +0000 (22:24 +0000)
There are perfectly legal programs where this happens, although they
are written in poor style.  It now just gives a warning.

v7/src/compiler/rtlgen/rgproc.scm

index 60b925708cc515fb60442f71f406faafbd001f56..45d443aeae5060aa35b7d9bee818cf7f90237e9e 100644 (file)
@@ -1,6 +1,6 @@
 #| -*-Scheme-*-
 
-$Header: /Users/cph/tmp/foo/mit-scheme/mit-scheme/v7/src/compiler/rtlgen/rgproc.scm,v 4.10 1990/02/02 18:40:00 cph Exp $
+$Header: /Users/cph/tmp/foo/mit-scheme/mit-scheme/v7/src/compiler/rtlgen/rgproc.scm,v 4.11 1990/04/01 22:24:35 jinx Exp $
 
 Copyright (c) 1988, 1989, 1990 Massachusetts Institute of Technology
 
@@ -171,7 +171,9 @@ MIT in each case. |#
           ((IC)
            (with-values (lambda () (make-ic-cons value 'USE-ENV)) recvr))
           ((TRIVIAL-CLOSURE)
-           (error "Letrec value is trivial closure" value)
+           ;; This is not an error.
+           ;; It can be the consequence of bad style.
+           (warn "Letrec value is trivial closure" value)
            (recvr (make-null-cfg)
                   (make-trivial-closure-cons value)))
           ((OPEN-EXTERNAL OPEN-INTERNAL)