Idris2/tests/idris2/casetree002/Issue1079.idr

15 lines
164 B
Idris
Raw Normal View History

2021-10-02 14:55:21 +03:00
%default total
g3 : (Nat, Nat) -> Nat
g3 (x, y) = x
g3 _ = 6
f : Monad m => m (Nat, Nat)
h3 : Monad m => m Nat
h3 = do
(x, y) <- f
| _ => pure 5
pure x