Created
September 29, 2014 09:33
-
-
Save hughfdjackson/90814b481ffaf6123a8f 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
| - + Errors (1) | |
| `-- tutorial.idr line 41 col 5: | |
| When elaborating right hand side of snoc: | |
| Can't unify | |
| Vect (n + 1) a | |
| with | |
| Vect (S n) a | |
| Specifically: | |
| Can't unify | |
| plus n 1 | |
| with | |
| 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
| append : Vect n a -> Vect m a -> Vect (n + m) a | |
| append (x :: Nil) ys = x :: ys | |
| append (x :: xs) ys = x :: (append xs ys) | |
| snoc : Vect n a -> a -> Vect (S n) a | |
| snoc xs a = append xs (a :: Nil) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment