drracket icon indicating copy to clipboard operation
drracket copied to clipboard

Error in guide does not appear with DrRacket defaults

Open spdegabrielle opened this issue 3 years ago • 1 comments

What version of Racket are you using? e.g., 8.5 [cs]

What program did you run?

image

(module just-lambda racket (provide lambda)) (module identity 'just-lambda (lambda (x) x))

(no error message)

from https://docs.racket-lang.org/guide/module-languages.html#%28part._implicit-forms%29

What should have happened?

an error message as depicted in the guide

image image

module: no #%module-begin binding in the module's language in: (module identity (quote just-lambda) (lambda (x) x))

Please include any other relevant details

the drracket default is for debugging to be on - this causes error trace to provide #%module-begin so the error does not display as depicted in the guide.

Options

  1. Add a callout to explain the behaviour
  2. change the behaviour of the debugging modes(errortrace) to provide the expected error?

I'm happy to do (1) as a temporary measure, but I am unable to do (2)

spdegabrielle avatar Jul 23 '22 19:07 spdegabrielle

It seems like this is an issue about how DrRacket interacts with errortrace incorrectly.

(require errortrace)

(module just-lambda racket
  (provide lambda))

(module identity 'just-lambda
  (lambda (x) x))

Running racket -f file.rkt results in an error as expected.

CC: @rfindler (this is not related to your recent changes though, since it already occurs in 8.5)

sorawee avatar Jul 24 '22 20:07 sorawee