Skip to content

Instantly share code, notes, and snippets.

@hughfdjackson
Created September 29, 2014 17:08
Show Gist options
  • Save hughfdjackson/8d34cb793b17c23614c3 to your computer and use it in GitHub Desktop.
Save hughfdjackson/8d34cb793b17c23614c3 to your computer and use it in GitHub Desktop.
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 concat : Vect n a
-> Vect m a
-> replace {P = \k => Vect k a} (sPlusAssoc m n) (Vect (m + n) a)
concat (x :: xs) ys = x :: (concat xs ys)
concat nil ys = ys
- + Errors (1)
`-- tutorial.idr line 16 col 24:
When elaborating type of snoc.concat:
When elaborating an application of function replace:
Can't unify
Type
with
(\k => Vect k a) (S (plus m n))
Specifically:
Can't unify
Type
with
(\k => Vect k a) (S (plus m n))
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment