bitrauser
bitrauser

Reputation: 70

Allow redefinition of initial bindings for R5RS without using DrRacket

For the R5RS language, DrRacket has the option to turn Disallow redefinition of initial bindings on or off.

This made me curious: Is it possible to adjust language settings like this without using DrRacket? (e.g., when using Racket from the command line, or Emacs)

If so, in which ways? If not, or not in a reasonable manner, why?

Upvotes: 4

Views: 334

Answers (1)

soegaard
soegaard

Reputation: 31147

The parameter compile-enforce-module-constants controls whether redefinitions are allowed:

soegaard$ ./racket 
Welcome to Racket v6.6.0.3.
-> (compile-enforce-module-constants #f)
-> (module test r5rs (define + -) (display (+ 43 1)) (newline))
-> (require 'test)
42

See more here: http://docs.racket-lang.org/guide/module-set.html

Upvotes: 6

Related Questions