Skip to main content

Import

rascal-0.34.0

Synopsis

Declare the import a module.

Syntax

import QualifiedName;

Description

An import has as effect that all public entities declared in module QualifiedName are made available to the importing module. Circular imports are allowed. All publicly visible entities in the imported module become available in the importing module.

Import is non-transitive, i.e., the visible entities from an imported module are not re-exported by the importing module.

Examples

Here, is how to import the IO library:

rascal>import IO;
ok
rascal>println("IO library was imported.");
IO library was imported.
ok