2.1.4 Import Statements

Import statements come in a few forms:

‹import-stmt›: import ‹import-source› as NAME | import NAME (, NAME)* from ‹import-source› ‹import-source›: ‹import-special› | ‹import-name› | ‹import-string› ‹import-special›: NAME ( STRING (, STRING)* ) ‹import-name›: NAME ‹import-string›: STRING

The form with ‹import-name› looks for a file with that name in the built-in libraries of Pyret, and it is an error if there is no such library.

Example:

import equality as EQ check: f = lam(): "" end equal-always3(f, f) is EQ.Unknown end