Reputation: 15
Hello I'm trying to generate ocaml documentation with ocamldoc. I'm trying the following command : ocamldoc -html alpha.mli -d doc/
But I have this error :
File "compiler/alpha.ml", line 16, characters 12-23:
Error: Unbound module Id
File "compiler/argHandler.ml", line 3, characters 17-27:
Error: Unbound module Parser
File "compiler/ARMGeneration.ml", line 7, characters 38-41:
Warning 10: this expression should have type unit.
File "compiler/ARMGeneration.ml", line 8, characters 47-59:
Warning 10: this expression should have type unit.
File "compiler/ARMGeneration.ml", line 11, characters 10-33:
Error: Unbound module Exception
File "compiler/ASMLGeneration.ml", line 7, characters 44-60:
Error: Unbound module Syntax
File "compiler/id.ml", line 44, characters 38-61:
Error: Unbound module Exception
File "compiler/knorm.ml", line 11, characters 4-14:
Error: Unbound module Syntax
File "compiler/letfold.ml", line 4, characters 4-15:
Error: Unbound module Syntax
File "compiler/main.ml", line 15, characters 4-24:
Error: Unbound module ArgHandler
File "compiler/regAllocation.ml", line 202, characters 18-29:
Error: Unbound module Id
File "compiler/SyntaxArm.ml", line 8, characters 12-16:
Error: Unbound module Id
File "compiler/syntax.ml", line 20, characters 12-16:
Error: Unbound module Id
11 error(s) encountered
Upvotes: 1
Views: 73
Reputation: 26
This error will happen when ocamldoc
can't locate the .cmi
generated by the build.
In order for it to work you need to first compile your project and then point ocamldoc
towards the _build/compiler
folder where you .cmi
are
A valid command for you might look like :
ocamldoc -html -I _build/compiler compiler/*.ml -d doc/
the -I
option indicate that you will specify the folder where the .cmi
are.
Upvotes: 1