Go to the first, previous, next, last section, table of contents.


Understanding Package Selection

At any given time, you are "in" one particular package, that indicated by @$s.package: All variables which you create -- and all functions which you define -- are placed in this package, and all functions and variables "in" that package are available to you for unqualified access.

In addition, you have at any given time some set of packages which are considered to be "available" to you. (CommonLisp specifies that there should be a single such set, but it is a single-user system, and this does not seem terribly practical in a multi-user system, so Muq instead provides one such set per user, optionally per job.) This set is indicated by @$s.lib, and may be listed by doing:

@$s.lib ls

You may create a new set of "available" packages by creating a new object and setting @$s.lib to point to it (if you want the effect to be permanent you should also set ~$s.lib to it) and then entering the desired packages into it. You should not normally have occasion to do this, however.

As you switch from project to project (at the least) you will usually switch from package to package, which is normally done using the inPackage command, which finds the package with the given name (creating it if no such package exists in @$s.lib points @$s.package to it.

The interactive MUF prompt, which we give as "Stack:" in our examples, is actually the name of the current package.


Go to the first, previous, next, last section, table of contents.