-
Notifications
You must be signed in to change notification settings - Fork 54
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
Livelits #1465
base: dev
Are you sure you want to change the base?
Conversation
Co-authored-by: Gregory Croisdale <[email protected]>
… columns more closely
One issue right now is that type errors on livelit projections aren't displayed, because the type error is located on the livelit ap underneath the parentheses. @disconcision any thoughts on what we should be doing here? I think in general I'd support shifting the indicators for type errors at the root of a parentheses to the parentheses (while still showing the error message when your cursor is on the parenthesized term as well). Maybe that general change would address this problem too? |
@cyrus- i've been thinking about this one, or more generally the issue of what to do when there is a 'deep' type error that will be hidden by a projector. i think it's worth considering a more general solution, where if there is an error under a projector, meaning an error strictly inside the underlying syntax which is not inside a splice, then we place a new kind of error/warning on the projector itself. but I'm not sure about how this should be surfaced in the cursor inspector. also i think this might be worth considering in tandem with a broadened notion of error provenance/attribution, which provides at least some kind of indication that an expression contains / is downstream of some kind of error or incompleteness. this doesn't have to be as aggressive as a red outline; perhaps a tag in the cursor inspector. i've also thought about the parentheses thing as an interim solution. as you point out there are subtleties (also wanting the error on the contained term), meaning it's not as simple as just changing parentheses statics. so yeah certainly possible to do something here but i think it's worth whiteboarding some options or at least dedicating a lunch to the short and mid-term future of error attribution |
yeah let's discuss this (+ rewriting) at lunch on Wednesday |
Two things came up when trying to finish this off:
You can backspace and space to unproject / reproject the livelit, but if you change the state, you can't do navigate using arrow keys, or insert characters until you click somewhere -- I suspect this is a problem with how I remove projectors in |
This merge brings a implementation of Livelits, proposed by https://hazel.org/papers/livelits-pldi2021.pdf, with some built-in examples.
Examples:
Timestamp(Can't keep up)JS(Can't save result?)Issues:
Limitations of projectors, to be fixed in separate PR:
Future PRs:
Cannot define Livelits during runtime, Livelits don't have access to context -- this needs to be revealed to projectors(^emotion(100))
-- this is a current limitation of projectors