Idris2/tests/idris2/coverage/coverage004/Cover.idr
2023-09-07 14:57:22 +01:00

15 lines
256 B
Idris

%default partial
data Foo : Type -> Type where
IsNat : Foo Nat
IsBool : Foo Bool
okay : a -> Foo a -> Bool
okay Z IsNat = False
okay True IsBool = True
bad : a -> Foo a -> Bool
bad Z IsNat = False
bad True IsBool = True
bad (Just 0) _ = False