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

Decompose elim into rec and case #454

Open
jonsterling opened this issue Oct 28, 2018 · 2 comments
Open

Decompose elim into rec and case #454

jonsterling opened this issue Oct 28, 2018 · 2 comments
Labels

Comments

@jonsterling
Copy link
Collaborator

@ecavallo I'd like to consider decomposing the eliminators into two different combinators: case and rec, as described in here: https://cs.ru.nl/~freek/courses/tt-2010/tvftl/epigram-notes.pdf

The idea is that case doesn't do any recursion, but just lets you see what constructor you have. And rec does the recursion (basically, for each type, it takes a motive P and provides all the recursive calls that can be made).

We'd have to make sure that this idea works for HITs, but a priori I have no reason to expect that it wouldn't extend directly.

Anyway, the benefit of this is that it separates the generation of the i.h. from the branching, and enables more flexible style of program, which will become important when we elaborate pattern matching.

@ecavallo
Copy link
Collaborator

I too see no reason why it wouldn't work. 👍

@jonsterling
Copy link
Collaborator Author

@ecavallo OK! We can investigate it later. I don't want to get distracted from finishing new-domain.

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

No branches or pull requests

2 participants