Idris2-boot/tests/idris2/coverage004/Cover.idr

13 lines
238 B
Idris
Raw Normal View History

2019-07-09 10:21:57 +03:00
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