2014-06-23 23:10:36 +00:00
|
|
|
variable N : Type.{1}
|
|
|
|
precedence `+`:65
|
|
|
|
|
|
|
|
namespace foo
|
|
|
|
variable a : N
|
|
|
|
variable f : N → N → N
|
|
|
|
infix + := f
|
2014-08-07 23:59:08 +00:00
|
|
|
end foo
|
2014-06-23 23:10:36 +00:00
|
|
|
|
|
|
|
namespace bla
|
|
|
|
variable b : N
|
|
|
|
variable f : N → N → N
|
|
|
|
infix + := f
|
2014-08-07 23:59:08 +00:00
|
|
|
end bla
|
2014-06-23 23:10:36 +00:00
|
|
|
|
|
|
|
variable g : N → N → N
|
|
|
|
|
2014-09-03 23:00:38 +00:00
|
|
|
open foo
|
|
|
|
open bla
|
2014-06-23 23:10:36 +00:00
|
|
|
print raw a + b -- + is overloaded, it creates a choice
|
|
|
|
print raw #foo a + b -- + is not overloaded, we are parsing inside #foo
|
|
|
|
print raw g (#foo a + b) (#bla a + b) -- mixing both
|