Idris2-boot/samples/params.idr

13 lines
269 B
Idris
Raw Normal View History

2020-02-26 00:37:48 +03:00
import Data.Vect
parameters (x : Nat, y : Nat)
addAll : Nat -> Nat
addAll z = x + y + z
parameters (y : Nat, xs : Vect x a)
data Vects : Type -> Type where
MkVects : Vect y a -> Vects a
append : Vects a -> Vect (x + y) a
append (MkVects ys) = xs ++ ys