mirror of
https://github.com/idris-lang/Idris2.git
synced 2024-12-27 13:43:28 +03:00
498421a236
This has caught a couple of things in the Idris 2 code base itself. Some tests needed partial annotations too.
15 lines
256 B
Idris
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
|