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

Wrong type generated by \l #48

Open
ghost opened this issue Mar 13, 2016 · 1 comment
Open

Wrong type generated by \l #48

ghost opened this issue Mar 13, 2016 · 1 comment

Comments

@ghost
Copy link

ghost commented Mar 13, 2016

When following the tutorial here I was told to press \l to generate plus_commutes_S. This generated a function of the wrong type:

plus_commutes_S : (k : Nat) -> (m : Nat) -> (plus m k = plus k m) -> S (plus m k) = plus m (S k)

instead of

plus_commutes_S : (k : Nat) -> (m : Nat) -> S (plus m k) = plus m (S k).

\t gives the right type of ?plus_commutes_S before doing this. Any idea what's happening?

@stephen-smith
Copy link
Contributor

Lifting a lemma out adds new parameters based on many (all?) local bindings. The TDD with Idris book recommends deleting the unnecessary parameters first thing.

I, too, find this behavior a little weird, but addressing it would probably be done as part of language development, instead of in the editor plugin.

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

1 participant