* bug#70033: Possible Bug: Inconsistent Evaluation Environment
@ 2024-03-27 15:46 Prafulla Giri via Bug reports for GUILE, GNU's Ubiquitous Extension Language
0 siblings, 0 replies; only message in thread
From: Prafulla Giri via Bug reports for GUILE, GNU's Ubiquitous Extension Language @ 2024-03-27 15:46 UTC (permalink / raw)
To: 70033
[-- Attachment #1: Type: text/plain, Size: 1440 bytes --]
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.
[-- Attachment #2: Type: text/html, Size: 5283 bytes --]
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2024-03-27 15:46 UTC | newest]
Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-03-27 15:46 bug#70033: Possible Bug: Inconsistent Evaluation Environment Prafulla Giri via Bug reports for GUILE, GNU's Ubiquitous Extension Language
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).