chore: "fix" <|> notation declaration
The `infix` declaration was generating a delaborator, but it is producing the invalid term ``` ConstantFunction.f myFun 3 <|> fun _ => ConstantFunction.f myFun 4 ``` It is invalid because the `macro_rules` for `<|>` is based on `binop_lazy%` which introduces the `fun _ =>` for us. I tried to use ``` notation:20 a:21 " <|> " b:20 => HOrElse.hOrElse a fun _ : Unit => b ``` but the delaborator generator does not work for this case.
This commit is contained in:
parent
eb94e87195
commit
6ea7869c6a
2 changed files with 2 additions and 2 deletions
|
|
@ -128,7 +128,7 @@ infixl:30 " || " => or
|
|||
notation:max "!" b:40 => not b
|
||||
|
||||
infixr:67 " :: " => List.cons
|
||||
infixr:20 " <|> " => HOrElse.hOrElse
|
||||
syntax:20 term:21 " <|> " term:20 : term
|
||||
infixr:60 " >> " => HAndThen.hAndThen
|
||||
infixl:55 " >>= " => Bind.bind
|
||||
infixl:60 " <*> " => Seq.seq
|
||||
|
|
|
|||
|
|
@ -22,4 +22,4 @@ fun (a : Nat) =>
|
|||
(@OfNat.ofNat.{0} Nat 2 (instOfNatNat 2)))
|
||||
true)
|
||||
def s : Option Nat :=
|
||||
ConstantFunction.f myFun 3 <|> ConstantFunction.f myFun 4
|
||||
HOrElse.hOrElse (ConstantFunction.f myFun 3) fun x => ConstantFunction.f myFun 4
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue