Your own OCaml modules, as with a compiler
In Basthon, you can open your own .ml files (Open menu or module= URL parameter) to use them as modules. Loading them is now close to separate compilation:
- a module is only loaded when first used:
stack.mlcan useQueueeven if it is opened beforequeue.ml; - an interface
queue.mliconstrains the module, and hides what it does not declare; - the errors of a module are shown in the cell that uses it, with the excerpt of the file at fault;
- a student's module takes precedence over the modules opened by Basthon: a
file.ml(the queue of the French course, "file" in French) is no longer hidden by js_of_ocaml'sFilemodule; - a module opened again after a change is reloaded, and circular dependencies are reported.
