Version française
Home     About     Download     Resources     Contact us    

This site is updated infrequently. For up-to-date information, please visit the new OCaml website at

Browse thread
Emacs mode with typing for ocaml
[ Home ] [ Index: by date | by threads ]
[ Search: ]

[ Message by date: previous | next ] [ Message in thread: previous | next ] [ Thread: previous | next ]
Date: -- (:)
From: Pascal Brisset <pascal.brisset@c...>
Subject: Emacs mode with typing for ocaml
A new Emacs mode is available for testing at :

Extracts from the README follow.


  CamlIT (Caml Interactive Typing) is yet another emacs mode for
Objective Caml source files. It runs a toplevel in the background in
order to obtain typing information about definitions and all their
subexpressions, including function arguments and patterns. This is
especially useful when examining complex third-party source files.


  Requires Objective Caml 2.01 or 2.02. Tested on Linux and Solaris
  with GNU emacs 20.2.1 and XEmacs 20.4.

  Put camlit.el in your emacs load-path and add to your .emacs:
  (autoload 'camlit-minor-mode "camlit" "Caml Interactive Typing" t)
  Alternatively, just load camlit.el manually with [M-x load-file].


  - [M-x camlit-minor-mode] enables CamlIT.

  - [C-t C-t] shows the full name (if relevant) and type of the Caml
    expression at the cursor location. Multiple invocations enlarge
    the scope to the enclosing syntactic expression.

  - [C-t C-k] resets the toplevel (recovers from inconsistent states).

  - CamlIT actually executes your Caml code. It should be used only on
    files which contain definitions without unwanted side-effects.

  - CamlIT uses type-unsafe tricks to interface with the toplevel (the
    point is, you don't have to recompile anything). This may cause
    crashes and other dangerous effects, especially if you are not
    running either the standard toplevel or a toplevel generated by


  The features of CamlIT were inspired by several existing works on
  structured editors and proof assistants.

- Pascal Brisset <> +33296051928 -
- France Telecom CNET DTL/MSV | 2 av Pierre Marzin | F-22307 Lannion -