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

Enhancement: implement Fix.cases such that an entire recursion of the data structure is not required #31

Open
Equilibris opened this issue Jul 11, 2024 · 0 comments
Labels

Comments

@Equilibris
Copy link
Collaborator

Equilibris commented Jul 11, 2024

Currently, we implement cases using the recursor. This means every time we want to do a cases operation we have to walk the entire datastructure just to throw away the result at the end.
This is fine for proving, but might not be good for computation.

It might be possible to use Fix.dest, which effectively unfolds a fixpoint type once,
but it turns out that Fix.dest is implemented using Fix.drec, so this would not avoid the full recursion.

In future it might be worth fixing this by adding the correct theorems to dest and removing its dependence on rec.

@alexkeizer alexkeizer changed the title Implement cases such that an entire recursion of the data structure is not required Enhancement: implement Fix.cases such that an entire recursion of the data structure is not required Jul 12, 2024
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