I'm trying to use geiser-mode in emacs to run racket code. I've been able to install geiser-mode and launched racket.
Yet when I run a definition twice I got the following error. this name was defined previously and cannot be re-defined
here is simple example
(define a (* 1 4))
a
run twice
In the debugger
#a: this name was defined previously and cannot be re-defined
#in: a
racketappears to behave differently in a file and the REPL. This file will throw an error:And this REPL session will not:
The behavior is because of the way modules work. When working in a file, there is an implicit module. Once the symbol
ahas been defined in that module another symbol with the same name cannot be defined within that module. The REPL simply expands forms without all the ceremony of modules.