2014-06-17 01:42:39 +00:00
|
|
|
namespace foo
|
|
|
|
variable A : Type.{1}
|
|
|
|
variable a : A
|
|
|
|
variable x : A
|
|
|
|
variable c : A
|
2014-08-07 23:59:08 +00:00
|
|
|
end foo
|
2014-06-17 01:42:39 +00:00
|
|
|
|
2014-08-23 22:44:28 +00:00
|
|
|
context
|
2014-06-17 01:42:39 +00:00
|
|
|
using foo (renaming a->b x->y) (hiding c)
|
|
|
|
check b
|
|
|
|
check y
|
|
|
|
check c -- Error
|
|
|
|
end
|
|
|
|
|
2014-08-23 22:44:28 +00:00
|
|
|
context
|
2014-06-17 01:42:39 +00:00
|
|
|
using foo (a x)
|
|
|
|
check a
|
|
|
|
check x
|
|
|
|
check c -- Error
|
|
|
|
end
|
|
|
|
|
2014-08-23 22:44:28 +00:00
|
|
|
context
|
2014-06-17 01:42:39 +00:00
|
|
|
using foo (a x) (hiding c) -- Error
|
|
|
|
end
|
|
|
|
|
2014-08-23 22:44:28 +00:00
|
|
|
context
|
2014-06-17 01:42:39 +00:00
|
|
|
using foo
|
|
|
|
check a
|
|
|
|
check c
|
|
|
|
check A
|
|
|
|
end
|
|
|
|
|
|
|
|
namespace foo
|
|
|
|
variable f : A → A → A
|
2014-07-01 23:55:41 +00:00
|
|
|
infix `*`:75 := f
|
2014-08-07 23:59:08 +00:00
|
|
|
end foo
|
2014-06-17 01:42:39 +00:00
|
|
|
|
2014-08-23 22:44:28 +00:00
|
|
|
context
|
2014-06-17 01:42:39 +00:00
|
|
|
using foo
|
|
|
|
check a * c
|
|
|
|
end
|
|
|
|
|
2014-08-23 22:44:28 +00:00
|
|
|
context
|
2014-06-17 01:42:39 +00:00
|
|
|
using [notation] foo -- use only the notation
|
|
|
|
check foo.a * foo.c
|
|
|
|
check a * c -- Error
|
|
|
|
end
|
|
|
|
|
2014-08-23 22:44:28 +00:00
|
|
|
context
|
2014-06-17 01:42:39 +00:00
|
|
|
using [decls] foo -- use only the declarations
|
|
|
|
check f a c
|
|
|
|
check a*c -- Error
|
|
|
|
end
|