Open dented42 opened 9 months ago
Another weirdness is that if #:with-contract
is #f
then (check-equal? (value-contract something) (value-contract (tweak-option (tweak-option something))))
fails. REPL experimentation makes it seems like tweak-option
is behaving normally for nothing
but acting like exercise-option
for something
.
It looks like errortrace might be relevant. Running racket -l errortrace -t <filename.rkt>
produces the same answer as in DrRacket.
After some trial and error, compile-enforce-module-constants
appears to be the root of the problem. If you use eval
with compile-enforce-module-constants
set to #f
, then it fails. Specifically, something
references the my-list
variable defined in the same module, so that makes it even more likely.
Edit: One more thing I found is that “non-trivial procedures” all work like something
, say, if you try (λ (x) (println x))
. I have no idea what’s exactly the problem.
running this file:
in the command line produces the following (expected) output:
However running it in DrRacket (with dynamic properties set to 'Debugging', the default) produces the following:
I genuinely don't know whether to file this issue with racket, DrRacket, or option contracts. I'm happy to refile it elsewhere if needed.