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