2

I am trying to generate documentation for a module of mine using ocamldoc. However, I use the Core library and ocamldoc complains about not finding it.

Error: Unbound module Core

I understand why thanks to this question, but it doesn't mention any solution for standard modules.

Any help?

Community
  • 1
  • 1
Richard-Degenne
  • 2,892
  • 2
  • 26
  • 43

1 Answers1

4

ocamldoc needs to see the compiled interface for Core, i.e. the file core.cmi. This can be done through one of the following mechanisms:

  • Add the -I dir option to ocamldoc where dir is the directory where the core.cmi file lies. So for example ocamldoc -I $(opam config var core:lib) ... should do.
  • If you use the ocamlfind indirection, add -package core to the command line. E.g. ocamlfind ocamldoc -package core
Daniel Bünzli
  • 5,119
  • 20
  • 21