Import

import brings names from a module into the current scope so they can be used without their full path. It comes in three forms:

import Math::Sqrt;                    // a single name
import Http::{ Request, Response };   // several names from one module
import Io::*;                         // every public name from a module

The braced form lists several names from the same module in one statement:

import Io::{ Print, PrintLine };

Without an import, refer to an item by its qualified path using the :: separator:

let result = Math::Sqrt(2.0);

Only pub items can be imported; private items are not visible outside their module.

See Also