Skip to content

Commit

Permalink
Add todo
Browse files Browse the repository at this point in the history
  • Loading branch information
ollef committed Feb 19, 2024
1 parent 1f1010f commit 42867ef
Showing 1 changed file with 21 additions and 0 deletions.
21 changes: 21 additions & 0 deletions tests/todo/global-equality3.vix
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
data List a = Nil | Cons a (List a)

map : forall a b. (a -> b) -> List a -> List b
map f Nil = Nil
map f (Cons a as) = Cons (f a) (map f as)

map2 : forall a b. (a -> b) -> List a -> List b
map2 f Nil = Nil
map2 f (Cons a as) = Cons (f a) (map2 f as)

data Equals forall A. (a b : A) where
Refl : Equals a a

test : forall a b (f : a -> b) as. Equals (map f as) (map2 f as)
test = Refl --loops

test2 : forall a b (f : a -> b) as. Equals (map f as) (map2 f as)
test2 @{f, as} = case as of
Nil -> Refl
Cons a as' -> case test2 @{f, as=as'} of
Refl -> Refl -- readback error

0 comments on commit 42867ef

Please sign in to comment.