Idris2-boot/tests/ttimp/record003/Record.yaff

17 lines
260 B
Plaintext

data Nat : Type where
Z : Nat
S : Nat -> Nat
data NotZero : Nat -> Type where
Is : {n : Nat} -> NotZero (S n)
record Positive (n : Nat) {auto 0 pos : NotZero n} where
constructor Check
a : Positive (S Z)
a = Check
b : Positive (S (S Z))
b = Check