Previous Next Contents

Chapter 14:   OCamlBrowser

This chapter describes OCamlBrowser, a source and compiled interface browser, written using LablTk. This is a necessary companion to the programmer.

Its functions are: The name of the command is ocamlbrowser, and, as with the compiler, you may change the standard library directory by setting CAMLLIB, and extend the load path using -I options.

14.1   Viewer

This is the first window you get when you start OCamlBrowser. It displays the list of modules in the load path. Click on one to start your trip.

14.2   Module walking

Each module is displayed in its own window.

At the top, a scrollable list of the defined identifiers. If you click on one, this will either create a new window (if this is a sub-module) or display the signature for this identifier below.

Signatures are clickable. Double clicking with the left mouse button on an identifier in a signature brings you to its signature, inside its module box.

A single click on the right button pops up a menu displaying the type declaration for the selected identifier. Its title, when selectable, also brings you to its signature.

At the bottom, a series of buttons, depending on the context. C-s lets you search a string in the signature.

14.3   File editor

You can edit files with it, if you like to live dangerously. Otherwise you can use it as a browser, making occasional corrections.

The Edit menu contains commands for jump (C-g), search (C-s), and sending the current phrase (or selection if some text is selected) to a sub-shell (M-x). For this last option, you may choose the shell via a dialog.

Essential functions are in the Compiler menu.

14.4   Shell

When you create a shell, a dialog is presented to you, letting you choose which command you want to run, and the title of the shell (to choose it in the Editor).

The executed subshell is given the current load path.

14.5   Bugs


1
To avoid combinatorial explosion of the search space, optional arguments in the actual type are ignored in the actual if (1) there are too many of them, and (2) they do not appear explicitly in the pattern.

Previous Next Contents