Skip to content
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

Distinguish Extraction Holes from Free Variables #11

Open
LPTK opened this issue Feb 14, 2017 · 0 comments
Open

Distinguish Extraction Holes from Free Variables #11

LPTK opened this issue Feb 14, 2017 · 0 comments

Comments

@LPTK
Copy link
Member

LPTK commented Feb 14, 2017

These are two distinct concepts, the conflation of which has only led to unnecessary complexity.
For example, spliced holes make sense but not spliced FVs.

Known problems in particular:

  • Reinserting an extracted binder will not capture a new binder of the same name. Solution: extracted binder should extract a FV with memory of the original binding (instead of extracting a BoundVal and having corresponding holes keep memory of it!). In fact, ideally extracted binders should behave the same as simple holes, except for the fact one can retrieve symbol info from them with the Sym xtor, and one can reinsert them in binder position to propagate annotations and other meta-info (todo).
  • It is currently not possible to directly pattern-match on free variables, but that can be a useful pattern. For example consider something like case ir"(acc,a) => ${Addition(ir"?acc:String",rest)}" => ... (currently, the inner pattern will extract any string and associate it with acc, and crash because there is no corresponding $ extraction).
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant