From c5f9113dcfa67064ce92558abd795afa4e3e825c Mon Sep 17 00:00:00 2001 From: Leonardo de Moura Date: Tue, 7 Sep 2021 17:10:36 -0700 Subject: [PATCH] test: use `<|>` at `binop_lazy` test --- tests/lean/binop_lazy.lean | 16 +++------------- 1 file changed, 3 insertions(+), 13 deletions(-) diff --git a/tests/lean/binop_lazy.lean b/tests/lean/binop_lazy.lean index ef3116bec4..d3a3cfd102 100644 --- a/tests/lean/binop_lazy.lean +++ b/tests/lean/binop_lazy.lean @@ -1,20 +1,10 @@ -class HOrElse' (α : Type u) (β : Type v) (γ : outParam (Type w)) where - hOrElse' : α → (Unit → β) → γ - -infixr:20 " <%> " => HOrElse.hOrElse' - -macro_rules | `($x <%> $y) => `(binop_lazy% HOrElse'.hOrElse' $x $y) - -instance : HOrElse' (IO α) (IO α) (IO α) where - hOrElse' a b := try a catch _ => b () - def f : IO Unit := (do IO.println "case 1"; throw (IO.userError "failed")) - <%> + <|> (do IO.println "case 2"; throw (IO.userError "failed")) - <%> + <|> (do IO.println "case 3") - <%> + <|> (let x := dbg_trace "hello"; 1 IO.println x)