[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
bug#13865: redefinition of +
From: |
Ludovic Courtès |
Subject: |
bug#13865: redefinition of + |
Date: |
Mon, 04 Mar 2013 14:34:37 +0100 |
User-agent: |
Gnus/5.130005 (Ma Gnus v0.5) Emacs/24.2 (gnu/linux) |
close 13865
tag 13865 notabug
thanks
Ian Price <address@hidden> skribis:
> is pretty much what we want usually. And I'm inclined to say NOTABUG for
> the repl when optimisation is turned on. However, in a script, this is a
> bug IMO, since we shouldn't really be optimising + if our top-level
> binding for + is not the builtin one, and we can certainly detect a
> redefinition of + within a file.
The REPL is different from a “real” program.
In a stand-alone file like this:
--8<---------------cut here---------------start------------->8---
(define (+ a b) (- a b))
(pk (+ 1 1))
--8<---------------cut here---------------end--------------->8---
You get the expected behavior, because top-level ‘define’ is like
‘letrec*’.
So closing it as not-a-bug. Let us know if you think of actions to be
taken.
Thanks,
Ludo’.