In particular, global identifiers defined by these phrases are entered in the module named top , not in a new module. Read, compile and execute source phrases from the given file. The .ml extension is automatically added if not present. The load function behaves much like include , except that a new module is created, with name the base name of the source file name. Global identifiers defined in the source file are entered in this module, instead of the top module as in the case of include .
Compilation proceeds as with the batch compiler, and produces the same results as camlc -c .
The compiled code is not loaded in memory. The .zo extension is automatically added to the file name, if not present. The bytecode file has been produced either by the standalone compiler camlc or by the compile function. Global identifiers defined in the file being loaded are entered in their own module, not in the top module, just as with the load function. That is, the argument and the result are displayed for each call, as well as the exceptions escaping out of foo , either raised by foo itself, or raised by one of the functions called from foo .