Skip to content

Instantly share code, notes, and snippets.

@hughfdjackson
Created September 29, 2014 09:33
Show Gist options
  • Select an option

  • Save hughfdjackson/90814b481ffaf6123a8f to your computer and use it in GitHub Desktop.

Select an option

Save hughfdjackson/90814b481ffaf6123a8f to your computer and use it in GitHub Desktop.
- + 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
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