Idris2/tests/idris2/interface008/Deps.idr
2021-01-21 11:33:03 +00:00

20 lines
346 B
Idris

data Fin : Nat -> Type where
FZ : Fin (S k)
FS : Fin k -> Fin (S k)
interface Finite t where
0 card : Nat
to : t -> Fin card
implementation Finite (Fin k) where
card = k
to = id
interface BadFinite t where
badcard : Nat
badto : t -> Fin card
implementation BadFinite (Fin k) where
badcard = k
badto = id