W Wrapl, The Programming Language

Libraries Sys.Module

Types

T

A handle to a loaded module.

InfoT

Information about an exported/imported symbol.

Functions

AddDirectory(directory @ Std.String.T)

Adds directory to the module search path.

FromRef(ref) : Agg.List.T

Returns the a name for ref as a list [module, import] if is a reference imported from a loaded module. Fails otherwise.

FromVal(val) : Agg.List.T

Returns the a name for val as a list [module, import] if is a value imported from a loaded module. Fails otherwise.

GetInfo(value)

Returns information about an exported value/reference.

Load(path @ Std.String.T, name @ Std.String.T) : T

Loads and returns a handle to the module name from path.

path can be NIL to load name relative to the current directory.

LoadFile(file @ Std.String.T) : T

Loads and returns a handle to the module located in file.

The loaded module is not cached by the module system.

LoadSymbol()

New() : T

Creates an returns an anonymous module.

Methods

:"."(module @ T, id @ Std.String.T) : Std.Object.T

Returns the imported value module.id.

:export(module @ T, id @ Std.String.T, value)

Adds the export value to module with the name id.

:import(module @ T, id @ Std.String.T) : Std.Object.T

Returns the imported value module.id.

:import(_ @ InfoT)

:module(_ @ InfoT)

:name(module @ T) : Std.String.T

Returns the name of module.

:path(module @ T) : Std.String.T

Returns the path of module.

:set_import_func(_ @ T, _ @ Std.Function.T)

:version(module @ T) : Std.Integer.SmallT

Returns the version of module.