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:
Leonardo de Moura 2021-09-07 17:23:06 -07:00
parent eb94e87195
commit 6ea7869c6a
2 changed files with 2 additions and 2 deletions

View file

@ -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

View file

@ -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