Project-wide occurrences for OCaml, a progress report
summary
Project-wide occurrences for OCaml builds a disk-backed map from compiler UIDs to every source location by adding a partial shape-reduction pass in the compiler, a new ocaml-index tool that finishes reduction from .cmt files, and dune rules + Merlin/ocaml-lsp-server hooks; the index is queried at edit time to return projectwide usages. It is available with recent tooling (needs 5.2), handles values, types, constructors and module direct usages, runs on 100k-line repos with modest watch-mode overhead, and currently misses first-class modules and some interface UID issues pending fixes. ocaml-index UID → locations index
AI-written summary · about
chapters (11)
- 0:00Introduction
- 2:31Compiler support for definitions
- 4:44Challenges in definitions
- 7:37Shapes and indexing
- 8:58Building occurrence index
- 10:46Demo of occurrences
- 13:58Current capabilities
- 15:22Future improvements
- 17:11Q&A on modules
- 18:38Q&A on performance
- 20:04Q&A on renaming








