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

Eta-expand constructors immediately #257

Open
favonia opened this issue Aug 21, 2018 · 8 comments
Open

Eta-expand constructors immediately #257

favonia opened this issue Aug 21, 2018 · 8 comments

Comments

@favonia
Copy link
Collaborator

favonia commented Aug 21, 2018

No description provided.

@favonia favonia changed the title Write loop for lam i -> loop i. Eta-expand constructors immediately Sep 2, 2018
@favonia
Copy link
Collaborator Author

favonia commented Sep 2, 2018

@jonsterling loop should be elaborated into extlam i -> loop i immediately and then there is no need to have a special elaboration for spines.

@favonia
Copy link
Collaborator Author

favonia commented Sep 2, 2018

This also gives us the ability to write loop directly.

@jonsterling
Copy link
Collaborator

jonsterling commented Sep 2, 2018

I don't like this solution, because it actually requires elaborating it to not this lambda, but a type annotated one. This will disrupt overloading of constructors, so it is a non-starter.

Instead, IMO, we really should continue to use the whole spine (sorry!), but maybe we can find a cleaner way to do it.

Separately, we should find a way to provide the functionality of just writing loop, or maybe to avoid ambiguity, s1.loop (as in Coq, written @loop).

@jonsterling
Copy link
Collaborator

(Sorry if my comment was difficult to understand, I am very sleepy. Will revisit tomorrow/today.)

@favonia
Copy link
Collaborator Author

favonia commented Sep 2, 2018

It is fine. Just that I did not know overloading is one of our goals.

@jonsterling
Copy link
Collaborator

I'll think about it agian when I'm more awake. it may be possible to do what you want without disrupting anything...

@favonia
Copy link
Collaborator Author

favonia commented Sep 2, 2018

I don't like this solution, because it actually requires elaborating it to not this lambda, but a type annotated one. This will disrupt overloading of constructors, so it is a non-starter.

I have to study the elaboration of constructors more carefully, but one hacky proposal is to grab the tip of the "arrows". For example, during the elaboration of loop, its type should be blah0 -> blah1 -> ... -> s1 and then we know it is about s1.

@jonsterling
Copy link
Collaborator

@favonia For some reason I'm worried about that idea, but I don't know why 😆 I'll think it over.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants