2014-10-02 16:20:52 -07:00
|
|
|
constant N : Type.{1}
|
2014-06-23 16:10:36 -07:00
|
|
|
precedence `+`:65
|
|
|
|
|
|
|
|
namespace foo
|
2014-10-02 16:20:52 -07:00
|
|
|
constant a : N
|
|
|
|
constant f : N → N → N
|
2014-06-23 16:10:36 -07:00
|
|
|
infix + := f
|
2014-08-07 16:59:08 -07:00
|
|
|
end foo
|
2014-06-23 16:10:36 -07:00
|
|
|
|
|
|
|
namespace bla
|
2014-10-02 16:20:52 -07:00
|
|
|
constant b : N
|
|
|
|
constant f : N → N → N
|
2014-06-23 16:10:36 -07:00
|
|
|
infix + := f
|
2014-08-07 16:59:08 -07:00
|
|
|
end bla
|
2014-06-23 16:10:36 -07:00
|
|
|
|
2014-10-02 16:20:52 -07:00
|
|
|
constant g : N → N → N
|
2014-06-23 16:10:36 -07:00
|
|
|
|
2014-09-03 16:00:38 -07:00
|
|
|
open foo
|
|
|
|
open bla
|
2014-06-23 16:10:36 -07: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
|