GNU bug report logs -
#70033
Possible Bug: Inconsistent Evaluation Environment
Previous Next
To reply to this bug, email your comments to 70033 AT debbugs.gnu.org.
Toggle the display of automated, internal messages from the tracker.
Report forwarded
to
bug-guile <at> gnu.org
:
bug#70033
; Package
guile
.
(Wed, 27 Mar 2024 15:48:04 GMT)
Full text and
rfc822 format available.
Acknowledgement sent
to
Prafulla Giri <prafulla.giri <at> protonmail.com>
:
New bug report received and forwarded. Copy sent to
bug-guile <at> gnu.org
.
(Wed, 27 Mar 2024 15:48:04 GMT)
Full text and
rfc822 format available.
Message #5 received at submit <at> debbugs.gnu.org (full text, mbox):
[Message part 1 (text/plain, inline)]
Hello there,
I have bumped into an interesting issue with GNU Guile 3.0.9 (as shipped via GNU GUIX).
Consider a file -- file1.scm -- with the following definition over-riding the built-in procedure vector-length:
(define (vector-length whatever) "over-ridden")
Now, consider another file -- file2.scm -- which makes use of this over-ridden procedure, the contents of which are:
(load "file1.scm") ; both files are in the same directory
(define (some-procedure whatever) (vector-length whatever))
Now, if one loads file2.scm with guile with:
$ guile -l file2.scm
and in the REPL tries:
>(some-procedure 'anything) ;; this is expected to return "over-ridden"
an error is thrown saying vector-length expects a vector. To make things "curiouser and curiouser"
>(vector-length 'anything) ;; returns "over-ridden", as expected.
As such, it seems that we have a situation where the evaluation environment is somewhat inconsistent.
Interestingly enough, this problem also seems to be there on GNU Guile 2.2.7 as available via GNU Guix.
Chez Scheme 9.5.8 behaves as expected: (some-procedure 'whatever) does return "over-ridden".
Likewise with TinyScheme 1.42, Scheme48 1.9.2, MIT Scheme 11.2 and even GNU Guile 1.8.8 --- all behave as expected and return "over-ridden" after evaluating (some-procedure 'whatever).
The issue does not occur if all the definitions are in the same file, however.
Perhaps this warrants further investigation.
[Message part 2 (text/html, inline)]
This bug report was last modified 275 days ago.
Previous Next
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.