For CM to work correctly, it must maintain an up-to-date picture of the state of the surrounding world (as far as that state affects CM's operation). Most of the time, this happens automatically and should be transparent to the user. However, occasionally it may become necessary to intervene expliticly.
Access to CM's internal state is facilitated by members of the CM.State structure.
structure State : sig
val pending : unit -> string list
val synchronize : unit -> unit
val reset : unit -> unit
end
CM.State.pending produces a list of strings, each string naming one of the symbols that are currently registered (i.e., ``virtually bound'') but not yet resolved by the autoloading mechanism.
CM.State.synchronize updates tables internal to CM to reflect changes in the file system. In particular, this will be necessary when the association of file names to ``file IDs'' (in Unix: inode numbers) changes during an ongoing session. In practice, the need for this tends to be rare.
CM.State.reset completely erases all internal state in CM. To do this is not very advisable since it will also break the association with pre-loaded libraries. It may be a useful tool for determining the amount of space taken up by the internal state, though.