Camel spotter: Oh, it was extremely interesting, very, very -
- quite... it was dull; dull, dull, dull, oh God it was dull.
- Sitting in the Waterloo waiting room. ...
+ quite... it was dull; dull, dull, dull, oh God it was dull.
+ Sitting in the Waterloo waiting room. ...
from You're No Fun Anymore,
Monty Python's Flying Circus
You first days after joining a large OCaml project should be this kind
of manual value definition spotting with find + grep commands. Yes,
actually it is very educational: you can learn a lot about the project
-struggling in the source tree (only if your collegues have organized
+struggling in the source tree (only if your collegues have organized
things very well :-P), but it is still a dull job...
To say short, OCamlSpotter is a tool which does this dull job
automatically for you and permits your energy for something more
"interesting" like Yeti spotting:
- The -annot option of ocamlc and ocamlopt is extended and creates
<module>.spot files (<module>.spit for .mli), which record the
location information of the names defined and used in the module.
- ocamlspot.el provides interactive ocaml-spotting of definition
- - Interfaces for other editors such as vi can be built easily, if you
+ - Interfaces for other editors such as Vim can be built easily.
+ A small sample for Vim is available (ocamlspot.vim).
+ocamlc compiler modifications
+ - The -annot option of ocamlc and ocamlopt is extended and creates
+ <module>.spot files (<module>.spit for .mli), which record the
+ location information of the names defined and used in the module.
+ - Existence of OCAML_ANNOT environment variable turns on .annot, .spot
+ and .spit file creation, even without -annot option to the compiler.
+ It is good for compiling OCaml softwares with .spot+.spit files without
+ocamlspot query application
Retrieve various annotation information from .spot or .spit files
of the source code position or identifier, specified by the
- search spec. Information is prited to stdout. They are:
+ search spec. Information is prited to stdout. They are:
The definition position of the object which the search spec
The type of the object which the search spec points to, if
available. In XType, paths are printed with position
iton: for example, "unit__6" instead of "unit".
+ informaton: for example, "unit__6" instead of "unit".
The kind and the name with id numbers of the identifier
+Value usage analysis (Experimental)
+ ocamlspot use [search] [target files and dirs]
+ search ::= [file]:[pos] | [file]:[kind]:[path]
+ pos ::= l[line]c[column_bytes] | b[bytes] | [bytes]
+ kind ::= v|t|e|m|mt|c|ct
+ ocamlspot use does opposite of ocamlspot query: search the uses of
+ the identifier specified by the search spec.
+ After the search spec, the search target path names can be specified.
+ If a target is a directory, the search is performed recursively
+Spot creation w/o real compilation
+ ocamlspot typecheck <args>
+ ocamlspot recheck <targets>
+ ocamlspot typecheck <args> is as same as ocamlc <args>, but it does
+ not create object files but only .annot/.spot/.spit files
+ independently. Useful if you want to stick to the official OCaml
+ compiler to create object files.
+ ocamlspot recheck <targets> redos the typecheck and creation of
+ .annot/.spot/.spit files using the compilation information already
+ stored in .spot/.spit files.
+ocamlspot.el emacs interface
This software contain lots of bugs and todos.
Read LICENSE file in this directory.
Jun FURUSE (firstname.lastname@example.org). Bug reports and comments are
welcome. Patches are appreciated. Donating camel related gadgets is
- the most wonderful.
Complaints might be simply ignored.