As part of packaing sedlex for Debian, I need to generate doc with ocamldoc. I don’t have much experience on actually using ocamldoc so I’ve been doing it with trials and errors. For the previous versions (sedlex 1.x) it works, but for sedlex 2.1, I got some errors and would like to have some pointers.
Here is the command I used (given sedlex is already installed with opam install sedlex
):
ocamlfind ocamldoc -sort \
\
-I ~/.opam/default/lib/sedlex \
-I ~/.opam/default/lib/sedlex/ppx \
\
-package gen \
-package compiler-libs \
-package ocaml-migrate-parsetree \
-package ppx_tools_versioned \
-ppx "ocamlfind ppx_tools_versioned/metaquot_405/ppx.exe --as-ppx" \
\
~/.opam/default/lib/sedlex/ppx/sedlex_cset.mli \
~/.opam/default/lib/sedlex/ppx/ppx_sedlex.ml \
~/.opam/default/lib/sedlex/ppx/sedlex.mli \
~/.opam/default/lib/sedlex/ppx/sedlex_ppx.ml \
~/.opam/default/lib/sedlex/ppx/unicode.mli \
~/.opam/default/lib/sedlex/sedlexing.mli \
\
-html -stars -m A
output:
File "/home/andy/.opam/default/lib/sedlex/ppx/ppx_sedlex.ml", line 17, characters 14-25:
17 | module Cset = Sedlex_cset
^^^^^^^^^^^
Error: Unbound module Sedlex_cset
File "/home/andy/.opam/default/lib/sedlex/ppx/sedlex.mli", line 7, characters 11-24:
7 | val chars: Sedlex_cset.t -> regexp
^^^^^^^^^^^^^
Error: Unbound module Sedlex_cset
File "/home/andy/.opam/default/lib/sedlex/ppx/unicode.mli", line 7, characters 11-24:
7 | val cc : Sedlex_cset.t
^^^^^^^^^^^^^
Error: Unbound module Sedlex_cset
Warning: Module or module type Sedlex_ppx__Unicode not found
Warning: Module or module type Sedlex_ppx__Sedlex_cset not found
Warning: Module or module type Sedlex_ppx__Sedlex not found
Warning: Module or module type Sedlex_ppx__Ppx_sedlex not found
Warning: Module or module type Sedlex_ppx__Unicode not found
Warning: Module or module type Sedlex_ppx__Sedlex_cset not found
Warning: Module or module type Sedlex_ppx__Sedlex not found
Warning: Module or module type Sedlex_ppx__Ppx_sedlex not found
Warning: Element Uchar.t not found
Warning: Element Lexing.pos_fname not found
Warning: Element Lexing.position not found
Warning: Tag @canonical not handled by this generator
Warning: Tag @canonical not handled by this generator
Warning: Tag @canonical not handled by this generator
Warning: Tag @canonical not handled by this generator
3 error(s) encountered
I wanna ask why am I getting Error: Unbound module
errors and how should I fix it?