racket / drracket

DrRacket, IDE for Racket
http://www.racket-lang.org/
Other
444 stars 93 forks source link

Error in guide does not appear with DrRacket defaults #571

Open spdegabrielle opened 1 year ago

spdegabrielle commented 1 year ago

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)

sorawee commented 1 year ago

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)