Note that you can't sensibly use a name from an opened module, nor open a module using a used name (even as a prefix).
1: header "#include <iostream>"; 2: module X { 3: type int = "int"; 4: proc print: int = "std::cout << $1;"; 5: proc endl: 1 = "std::cout << std::endl;"; 6: } 7: 8: use X::int; 9: use eol = X::endl; 10: 11: val x:int = 1; 12: use y = x; 13: X::print y; eol; 14:
use qualified_name; use new_name = old_qualified_name;The first form requires a proper qualified name and is equivalent to the second form, where the new_name is the last component of the qualified_name.