Can someone explain why this example from the Racket Guide allows a
re-definition of a constant but the second case (not from the Racket
Guide) gives an error. Both are executed in the interactions window of
DrRacket.

Many thanks,
Harry

> (compile-enforce-module-constants #f)
> (module m2 racket
    (provide pie)
    (define pie 3.141597))
> (require 'm2)
> (module m2 racket
    (provide pie)
    (define pie 3))
> pie
3
>


BUT

> (compile-enforce-module-constants #f)
> (module m2 racket
    (provide pie)
    (define pie 3)
    (define pie 4))
.
gives the error:  module: duplicate definition for identifier in: pie
>
_________________________________________________
  For list-related administrative tasks:
  http://lists.racket-lang.org/listinfo/users

Reply via email to