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

[discussion] list literal manipulation #23

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

414owen
Copy link

@414owen 414owen commented Dec 17, 2020

👋 Hi,
It would be really useful to be able to manipulate list literals as their cons-list counterparts.
I'm guessing this isn't supported because retrie doesn't run the desugarer?

@facebook-github-bot
Copy link
Contributor

Hi @414owen!

Thank you for your pull request and welcome to our community. We require contributors to sign our Contributor License Agreement, and we don't seem to have you on file.

In order for us to review and merge your code, please sign at https://code.facebook.com/cla. If you are contributing on behalf of someone else (eg your employer), the individual CLA may not be sufficient and your employer may need to sign the corporate CLA.

If you have received this in error or have any questions, please contact us at [email protected]. Thanks!

@414owen 414owen mentioned this pull request Dec 17, 2020
@facebook-github-bot facebook-github-bot added the CLA Signed Do not delete this pull request or issue due to inactivity. label Dec 17, 2020
@facebook-github-bot
Copy link
Contributor

Thank you for signing our Contributor License Agreement. We can now accept your code for this (and any) Facebook open source project. Thanks!

@pepeiborra
Copy link
Contributor

Ah, I understand now, thank you for taking the time to submit the example.

I'm afraid that you are right, retrie doesn't run the desugarer. In fact, it doesn't even run the renamer! I very much wish it did run the renamer at least, but I think the desugarer is probably out of scope since I don't think that it is possible to reconstruct the user program back after desugaring and transforming.

@xich
Copy link
Contributor

xich commented Dec 17, 2020

It's possible to build this sort of thing (equivalence between list forms) as a special case, but in general, equivalence in retrie is syntactical modulo alpha-equivalence because we only run the parser.

Thanks for the test case... I'll throw together a patch and we can discuss. We already do something like this for $... I have ideas for generalizing the implementation a bit, but haven't pursued it yet.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
CLA Signed Do not delete this pull request or issue due to inactivity.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants