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

Partial functions don't desugar to total functions with metavariables #23

Open
tdidriksen opened this issue Oct 30, 2014 · 1 comment
Open

Comments

@tdidriksen
Copy link
Owner

Currently, the following only generates a clause for cycle (S n) m:

cycle : Nat -> Nat -> Stream' Nat
&hd cycle n m = n
&tl cycle (S n) m = cycle n m

Resulting in:

cycle : Nat -> Nat -> Stream' Nat
cycle (S n) m = MkStream' (S n) cycle n m

Perhaps two clauses should be generated, such that 'cycle' is desugared to:

cycle : Nat -> Nat -> Stream' Nat
cycle Z m = MkStream' Z ?cycletl
cycle (S n) m = MkStream' (S n) cycle n m

This may or may not be an issue.

@tdidriksen
Copy link
Owner Author

On second thought, generating the missing cases might be quite difficult, since we would have to identify all missing cases!

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