Created
September 29, 2014 15:57
-
-
Save hughfdjackson/d0c58848de06ff67054c to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| - tutorial.idr line 16 col 9: | |
| When elaborating right hand side of prepend: | |
| Can't unify | |
| Vect (S (m + n)) a | |
| with | |
| Vect (plus m (S n)) a | |
| Specifically: | |
| Can't unify | |
| S (m + n) | |
| with | |
| plus m (S n) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| sPlusAssoc : (m, n: Nat) -> S (m + n) = plus m (S n) | |
| sPlusAssoc Z n = refl | |
| sPlusAssoc (S m) n = rewrite sPlusAssoc m n in refl | |
| total prepend : Vect n a -> Vect m a -> Vect (m + n) a | |
| prepend (x :: xs) ys = x :: (prepend xs ys) | |
| prepend Nil ys = ys | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment