Idris2-boot/tests/ttimp/search005/Vect.yaff
Edwin Brady d6e637b2c5 Fix structural difference check in search
Now it successfully finds zipWith too
2019-06-02 15:16:54 +01:00

34 lines
677 B
Plaintext

data Bool : Type where
False : Bool
True : Bool
not : Bool -> Bool
not False = True
not True = False
data Nat : Type where
Z : Nat
S : Nat -> Nat
plus : Nat -> Nat -> Nat
plus Z y = y
plus (S k) y = S (plus k y)
data Vect : ? -> Type -> Type where
Nil : Vect Z a
Cons : a -> Vect k a -> Vect (S k) a
append : Vect n a -> Vect m a -> Vect (plus n m) a
append Nil ys = ?appNil
append (Cons x xs) ys = ?appCons
app2 : Vect n a -> Vect m a -> Vect (plus n m) a
data Pair : Type -> Type -> Type where
MkPair : a -> b -> Pair a b
zip : Vect n a -> Vect n b -> Vect n (Pair a b)
zipWith : (a -> b -> c) -> Vect n a -> Vect n b -> Vect n c