fix(library/init/function): '$' notation should be left-associative
This commit is contained in:
parent
f75de2e950
commit
4e307f906f
3 changed files with 8 additions and 1 deletions
|
|
@ -8,7 +8,7 @@ General operations on functions.
|
|||
prelude
|
||||
import init.prod init.funext init.logic
|
||||
|
||||
notation f ` $ `:1 a:0 := f a
|
||||
notation f ` $ `:1 a:1 := f a
|
||||
|
||||
variables {A : Type} {B : Type} {C : Type} {D : Type} {E : Type}
|
||||
|
||||
|
|
|
|||
5
tests/lean/notation8.lean
Normal file
5
tests/lean/notation8.lean
Normal file
|
|
@ -0,0 +1,5 @@
|
|||
constant f : nat → nat → nat
|
||||
constant g : nat → nat
|
||||
|
||||
check f $ 1 + g 1 $ g 2 + 2
|
||||
check f $ g 1 $ (f $ 1 + 1 $ g 2)
|
||||
2
tests/lean/notation8.lean.expected.out
Normal file
2
tests/lean/notation8.lean.expected.out
Normal file
|
|
@ -0,0 +1,2 @@
|
|||
f (1 + g 1) (g 2 + 2) : ℕ
|
||||
f (g 1) (f (1 + 1) (g 2)) : ℕ
|
||||
Loading…
Add table
Reference in a new issue