Open bennn opened 1 year ago
Ideas:
require/untyped-contract
know what language the server is usingunsafe-require/typed
somehow inside require/untyped-contract
--- which probably means we need to fix unsafe-require/typed
to work for optional/shallow => deepHi @bennn ,
I have posted some seemingly working code to add a language specification to require/untyped-contract
. Two questions:
Best, Raoul
This issue has been mentioned on Racket Discussions. There might be relevant details there:
https://racket.discourse.group/t/replacing-lexical-context-in-a-macro/2004/1
Yes, language spec should be optional.
Fetching automatically seems too hard. It may have trouble with identifiers that get reprovided by TR languages (Shallow -> Deep -> require/untyped-contract).
I'm confused now. Does it even make sense to use require/untyped-contract
on a shallow module?
EDIT: I think not, because shallow contract gen doesn't take a fail callback the way deep does [link]. It can still error if the match fails, but that's not supposed to happen.
(It doesn't make sense for no-check because that language doesn't generate contracts at all.)
Maybe the right thing is just a better error message.
What version of Racket are you using?
Welcome to Racket v8.6.0.9 [cs].
What program did you run?
This program is ok with normal TR and not okay for shallow, optional, and no-check
server.rkt
main.rkt
What should have happened?
No error
If you got an error message, please include it here.
Shallow
no-check
PS thanks to @Rscho314 for the report in https://github.com/racket/math/issues/75