1. camlspotter
  2. mutated_ocaml


mutated_ocaml / INSTALL-ocamlspot.txt

0. OCamlSpotter requires patching against the OCaml compiler, but now, 
   thanks to the very kind interpretation of the OCaml license, OCamlSpot can be distributed
   as an entire modified source code tree of OCaml.

   In the following, some step numbers are gone, they were required when OCamlSpotter is distributed
   as a patch.

4. Build a bytecode compiler

  - ./configure
  - make core coreboot

6. Continue building

  - make world
  - make opt
  - make opt.opt

8. Install it

  - make install

9. Emacs interface

  Write the following into your .emacs:

  ; load-path
  (setq load-path (cons "WHERE-YOU-HAVE-INSTALLED-THE-ELISP" load-path))
  ; set the path of the ocamlspot binary
  (setq ocamlspot-path "WHERE-YOU-HAVE-INSTALLED-THE-BINARIES/ocamlspot")
  ; autoload
  (autoload 'ocamlspot-query "ocamlspot" "OCamlSpot")
  ; tuareg mode hook (use caml-mode-hook instead if you use caml-mode)
    (add-hook 'tuareg-mode-hook 
    	  '(lambda ()
  	     (local-set-key "\C-c;" 'ocamlspot-query)
  	     (local-set-key "\C-c\C-t" 'ocamlspot-type)
             (local-set-key "\C-c\C-y" 'ocamlspot-type-and-copy)
  	     (local-set-key "\C-c\C-u" 'ocamlspot-use)
  	     (local-set-key "\C-ct" 'caml-types-show-type)))
10. How to use

  Compiler your ML project by this patched compiler with -annot option to create .spot files. Open one of the source files in Emacs and place the cursor at the name whose definition is in question. Type C-c; will show you the defintion.

11. bug report

  Please report bugs to jun.furuse at gmail.