-
-
Notifications
You must be signed in to change notification settings - Fork 29
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Shallow / Optional types #75
Comments
Maybe TR should have a multi lang that copies well-typed code into a few different submodules. |
This issue has been mentioned on Racket Discussions. There might be relevant details there: https://racket.discourse.group/t/pre-release-shallow-and-optional-types/1303/6 |
@bennn At what stage does (static) typechecking happen in the |
Static typechecking is early. The rough pipeline is: macro-expand -> typecheck -> optimize -> protect -> done. But, the multi lang idea is still going to need a rework of TR because the later passes depend on a type environment. If we typecheck the outer module and then copy it to two inner modules, we need to make two copies of the type env. that match the syntax locations in the inner modules. As a first step, though, we should make sure that EDIT: maybe, something really simple like |
I clearly don't have the chops to go anywhere near the expander or the typechecker, unfortunately.
triggers the following errors in the session (identical whether replacement is
|
Dug a little more, and it seems a problem is that as soon as
This error is triggered by replacing |
Thanks! It looks like there's some Deep code left after the replacement. Could be a submodule, and could be a (EDIT: it does! just hard to see with the filename |
I changed my approach to use a One thing does bug me, however: even though I'm using
NB. Trying |
Yes, that error means there's some typed code around. It's coming from We should a TR issue for this. In no-check mode, the helpers should do something more helpful than expand to a type error ... either expand to |
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 |
Now that Typed Racket has Shallow & Optional modes, we might be able to make the math library work for untyped code without crazy slowdowns.
But it's not as simple as changing the whole math library to use
#lang typed/racket/shallow
, because that'll slow down all the current#lang typed/racket
clients of math.I think what we need is a graceful way to provide two versions of math (without actually cloning the codebase):
math/untyped
or something, which uses ShallowThe text was updated successfully, but these errors were encountered: