OS Manuals

/usr/lib/ocaml-4/bin/ocamldoc

ocamldoc — OCaml source-code documentation generator

From ocamldoc-4 4.14.5-r0 (enterprise-packages), captured 2026-11-08 by running ocamldoc --help (exit 0). permalink

Usage: /usr/lib/ocaml-4/bin/ocamldoc [options] <files>
Options are:
  -absname  Show absolute filenames in error messages
  -alert <list>  Enable or disable alerts according to <list>:
        +<alertname>  enable alert <alertname>
        -<alertname>  disable alert <alertname>
        ++<alertname> treat <alertname> as fatal error
        --<alertname> treat <alertname> as non-fatal
        @<alertname>  enable <alertname> and treat it as fatal error
    <alertname> can be 'all' to refer to all alert names
  -I <dir>  Add <dir> to the list of include directories
  -impl <file>  Compile <file> as a .ml file
  -intf <file>  Compile <file> as a .mli file
  -intf-suffix <string>  Suffix for interface files (default: .mli)
  -intf_suffix <string>  (deprecated) same as -intf-suffix
  -labels  Use commuting label mode
  -modern  (deprecated) same as -labels
  -alias-deps  Do record dependencies for module aliases
  -no-alias-deps  Do not record dependencies for module aliases
  -app-funct  Activate applicative functors
  -no-app-funct  Deactivate applicative functors
  -noassert  Do not compile assertion checks
  -nolabels  Ignore non-optional labels in types
  -nostdlib  Do not add default directory to the list of include directories
  -open <module>  Opens the module <module> before typing
  -pp <command>  Pipe sources through preprocessor <command>
  -ppx <command>  Pipe abstract syntax trees through preprocessor <command>
  -principal  Check principality of type inference
  -no-principal  Do not check principality of type inference (default)
  -rectypes  Allow arbitrary recursive types
  -no-rectypes  Do not allow arbitrary recursive types (default)
  -safe-string  (was set when configuring the compiler)
  -short-paths  Shorten paths in types
  -strict-sequence  Left-hand part of a sequence must have type unit
  -no-strict-sequence  Left-hand part of a sequence need not have type unit (default)
  -strict-formats  Reject invalid formats accepted by legacy implementations
     (Warning: Invalid formats may behave differently from
      previous OCaml versions, and will become always-rejected
      in future OCaml versions. You should always use this flag
      to detect invalid formats so you can fix them.)
  -no-strict-formats  Accept invalid formats accepted by legacy implementations (default)
     (Warning: Invalid formats may behave differently from
      previous OCaml versions, and will become always-rejected
      in future OCaml versions. You should never use this flag
      and instead fix invalid formats.)
  -thread  (deprecated) same as -I +threads
  -unboxed-types  unannotated unboxable types will be unboxed
  -no-unboxed-types  unannotated unboxable types will not be unboxed (default)
  -unsafe-string  (option not available)
  -v  Print compiler version and location of standard library and exit
  -verbose  Print calls to external commands
  -version  Print version and exit
  --version  Print version and exit
  -vmthread   (no longer supported)
  -vnum  Print version number and exit
  -w <list>  Enable or disable warnings according to <list>:
        +<spec>   enable warnings in <spec>
        -<spec>   disable warnings in <spec>
        @<spec>   enable warnings in <spec> and treat them as errors
     <spec> can be:
        <num>             a single warning number
        <num1>..<num2>    a range of consecutive warning numbers
        <letter>          a predefined set
     default setting is "+a-4-7-9-27-29-30-32..42-44-45-48-50-60-66..70"
  - <file>  Treat <file> as a file name (even if it starts with `-')
  -initially-opened-module <module> Name of the module that is initially opened
  -lib <module> Name of the library namespace for a prefixed library.Note: very experimental.
  -text <file> Consider <file> as a .txt file
  -warn-error  Treat ocamldoc warnings as errors
  -show-missed-crossref  Show missed cross-reference opportunities
  -hide-warnings  do not print ocamldoc warnings
  -o <file> Set the output file name, used by texi, latex and dot generators
		(default is ocamldoc.out)
		or the prefix of index files for the HTML generator
		(default is index)
  -d <dir> Generate files in directory <dir>, rather than in current
		directory (for man and HTML generators)
  -sort  Sort the list of top modules before generating the documentation
  -no-stop  Do not stop at (**/**) comments
  -no-custom-tags  Do not allow custom @-tags
  -stars  Remove beginning blanks of comment lines, until the first '*'
  -inv-merge-ml-mli  Inverse implementations and interfaces when merging
  -no-module-constraint-filter Do not filter module elements using module type constraints
  -keep-code  Always keep code when available

  -dump <file> Dump collected information into <file>
  -load <file> Load information from <file> ; may be used several times

  -t <title> Use <title> as title for the generated documentation
  -intro <file> Use content of <file> as ocamldoc text to use as introduction
		(HTML, LaTeX and TeXinfo only)
  -hide <M1,M2.M3,...> Hide the given complete module names in generated doc
  -m <options> specify merge options between .mli and .ml
		<options> can be one or more of the following characters:
		d  merge description
		a  merge @author
		v  merge @version
		l  merge @see
		s  merge @since
		b  merge @before
		o  merge @deprecated
		p  merge @param
		e  merge @raise
		r  merge @return
		c  merge custom @-tags
		A  merge all

 *** choosing a generator ***

  -html  Generate HTML documentation
  -latex  Generate LaTeX documentation
  -texi  Generate TeXinfo documentation
  -man  Generate man pages
  -dot  Generate dot code of top modules dependencies
  -customdir Display custom generators standard directory and exit
  -i <dir> Add the given directory to the search path for custom
		generators
  -g <file.cm[o|a|xs]> Load file defining a new documentation generator

 *** HTML options ***

  -all-params  Display the complete list of parameters for functions and
		methods (HTML only)
  -css-style <file> Use content of <file> as CSS style definition (HTML only)
  -index-only  Generate index files only (HTML only)
  -colorize-code  Colorize code even in documentation pages (HTML only)
  -short-functors  Use short form to display functor types (HTML only)
  -charset <s> Add information about character encoding being s
		(default is iso-8859-1)
  -nonavbar  Do not include the navigation bar (HTML only)

 *** LaTeX options ***

  -noheader  Suppress header in generated documentation
		(LaTeX and TeXinfo only)
  -notrailer  Suppress trailer in generated documentation
		(LaTeX and TeXinfo only)
  -sepfiles  Generate one file per toplevel module (LaTeX only)
  -latextitle n,style Associate {n } to the given sectioning style
		(e.g. 'section') in the latex output (LaTeX only)
		Default sectioning is:
		 0 -> section
		 1 -> section
		 2 -> subsection
		 3 -> subsubsection
		 4 -> paragraph
		 5 -> subparagraph
  -latex-value-prefix <string>
		Use <string> as prefix for the LaTeX labels of values.
		(default is "val:")
  -latex-type-prefix <string>
		Use <string> as prefix for the LaTeX labels of types.
		(default is "type:")
  -latex-exception-prefix <string>
		Use <string> as prefix for the LaTeX labels of exceptions.
		(default is "exception:")
  -latex-attribute-prefix <string>
		Use <string> as prefix for the LaTeX labels of attributes.
		(default is "val:")
  -latex-method-prefix <string>
		Use <string> as prefix for the LaTeX labels of methods.
		(default is "method:")
  -latex-module-prefix <string>
		Use <string> as prefix for the LaTeX labels of modules.
		(default is "module:")
  -latex-module-type-prefix <string>
		Use <string> as prefix for the LaTeX labels of module types.
		(default is "moduletype:")
  -latex-class-prefix <string>
		Use <string> as prefix for the LaTeX labels of classes.
		(default is "class:")
  -latex-class-type-prefix <string>
		Use <string> as prefix for the LaTeX labels of class types.
		(default is "classtype:")
  -notoc  Do not generate table of contents (LaTeX only)

 *** texinfo options ***

  -noindex  Do not build index for Info files (TeXinfo only)
  -esc8  Escape accentuated characters in Info files (TeXinfo only)
  -texinfotitle n,style Associate {n } to the given sectioning style
		(e.g. 'section') in the texInfo output (TeXinfo only)
		Default sectioning is:
		 0 -> @chapter , @majorheading
		 1 -> @chapter , @majorheading
		 2 -> @section , @heading
		 3 -> @subsection , @subheading
		 4 -> @subsubsection , @subsubheading
  -info-section  Specify section of Info directory (TeXinfo only)
  -info-entry  Specify Info directory entry (TeXinfo only)

 *** dot options ***

  -dot-colors  <c1,c2,...,cn>
		Use colors c1,c1,...,cn in the dot output
		(default list is darkturquoise,darkgoldenrod2,cyan,green,
		magenta,yellow,burlywood1,aquamarine,floralwhite,lightpink,
		lightblue,mediumturquoise,salmon,slategray3)
  -dot-include-all  Include all modules in the dot output, not only the
		modules given on the command line
  -dot-types  Generate dependency graph for types instead of modules
  -dot-reduce  Perform a transitive reduction on the selected dependency graph
		before the dot output

 *** man pages options ***

  -man-mini  Generate man pages only for modules, module types, classes
		and class types (man only)
  -man-suffix <suffix> Use <suffix> for man page files (default is 3o) (man only)

  -man-section <section> Use <section> in man page files (default is 3) (man only)

  -help  Display this list of options
  --help  Display this list of options
Options (84)
OptionDescriptionSource
-absnameShow absolute filenames in error messageshelp
-alert listEnable or disable alerts according to <list>: +<alertname> enable alert <alertname>help
-I dirAdd <dir> to the list of include directorieshelp
-impl fileCompile <file> as a .ml filehelp
-intf fileCompile <file> as a .mli filehelp
-intf-suffix stringSuffix for interface files (default: .mli)help
-intf_suffix string(deprecated) same as -intf-suffixhelp
-labelsUse commuting label modehelp
-modern(deprecated) same as -labelshelp
-alias-depsDo record dependencies for module aliaseshelp
-no-alias-depsDo not record dependencies for module aliaseshelp
-app-functActivate applicative functorshelp
-no-app-functDeactivate applicative functorshelp
-noassertDo not compile assertion checkshelp
-nolabelsIgnore non-optional labels in types.help + man
-nostdlibDo not add default directory to the list of include directorieshelp
-open moduleOpens the module <module> before typinghelp
-pp commandPipe sources through preprocessor <command>help
-ppx commandPipe abstract syntax trees through preprocessor <command>help
-principalCheck principality of type inferencehelp
-no-principalDo not check principality of type inference (default)help
-rectypesAllow arbitrary recursive types.help + man
-no-rectypesDo not allow arbitrary recursive types (default)help
-safe-string(was set when configuring the compiler)help
-short-pathsShorten paths in typeshelp
-strict-sequenceLeft-hand part of a sequence must have type unithelp
-no-strict-sequenceLeft-hand part of a sequence need not have type unit (default)help
-strict-formatsReject invalid formats accepted by legacy implementations (Warning: Invalid formats may behave differently from previous OCaml versions, and will become always-rejected in future OCaml versions.help
-no-strict-formatsAccept invalid formats accepted by legacy implementations (default) (Warning: Invalid formats may behave differently from previous OCaml versions, and will become always-rejected in future OCaml…help
-thread(deprecated) same as -I +threadshelp
-unboxed-typesunannotated unboxable types will be unboxedhelp
-no-unboxed-typesunannotated unboxable types will not be unboxed (default)help
-unsafe-string(option not available)help
-vPrint compiler version and location of standard library and exithelp + man
-verbosePrint calls to external commandshelp
-versionPrint version string and exit.help + man
--versionPrint version and exithelp
-vmthread(no longer supported)help
-vnumPrint short version number and exit.help + man
-w listEnable or disable warnings according to <list>: +<spec> enable warnings in <spec>help
-warn-errorTreat ocamldoc warnings as errors.help + man
-show-missed-crossrefShow missed cross-reference opportunities.help + man
-hide-warningsDo not print ocamldoc warnings.help + man
-sortSort the list of top-level modules before generating the documentation.help + man
-no-stopKeep elements placed after the (/) special comment.help + man
-no-custom-tagsDo not allow custom @-tags.help + man
-starsRemove blank characters until the first asterisk ('') in each line of comments.help + man
-inv-merge-ml-mliReverse the precedence of implementations and interfaces when merging.help + man
-keep-codeAlways keep the source code for values, methods and instance variables, when available.help + man
-htmlGenerate documentation in HTML default format.help + man
-latexGenerate documentation in LaTeX default format.help + man
-texiGenerate documentation in TeXinfo default format.help + man
-manGenerate documentation as a set of Unix man pages.help + man
-dotGenerate a dependency graph for the toplevel modules, in a format suitable for displaying and processing by dot(1).help + man
-all-paramsDisplay the complete list of parameters for functions and methods (HTML only)help + man
-index-onlyGenerate index files only (HTML only)help + man
-colorize-codeColorize the OCaml code enclosed in [ ] and {[ ]}, using colors to emphasize keywords, etc.help + man
-short-functorsUse a short form to display functors: module M : functor (A:Module) -> functor (B:Module2) -> sig ..help + man
-nonavbarDo not include the navigation bar (HTML only)help
-noheaderSuppress header in generated documentation (LaTeX and TeXinfo only)help + man
-notrailerSuppress trailer in generated documentation (LaTeX and TeXinfo only)help + man
-sepfilesGenerate one .tex file per toplevel module, instead of the global ocamldoc.out file.help + man
-latex-value-prefix stringGive a prefix to use for the labels of the values in the generated LaTeX document.help + man
-latex-type-prefix stringUse <string> as prefix for the LaTeX labels of types.help
-latex-exception-prefix stringUse <string> as prefix for the LaTeX labels of exceptions.help
-latex-attribute-prefix stringUse <string> as prefix for the LaTeX labels of attributes.help
-latex-method-prefix stringUse <string> as prefix for the LaTeX labels of methods.help
-latex-module-prefix stringUse <string> as prefix for the LaTeX labels of modules.help
-latex-module-type-prefix stringUse <string> as prefix for the LaTeX labels of module types.help
-latex-class-prefix stringUse <string> as prefix for the LaTeX labels of classes.help
-latex-class-type-prefix stringUse <string> as prefix for the LaTeX labels of class types.help
-notocDo not generate table of contents (LaTeX only)help + man
-noindexDo not build index for Info files (TeXinfo only)help + man
-esc8Escape accentuated characters in Info files (TeXinfo only)help + man
-info-sectionSpecify section of Info directory (TeXinfo only)help + man
-info-entrySpecify Info directory entry (TeXinfo only)help + man
-dot-colors<c1,c2,...,cn> Use colors c1,c1,...,cn in the dot output (default list is darkturquoise,darkgoldenrod2,cyan,green, magenta,yellow,burlywood1,aquamarine,floralwhite,lightpink,…help
-dot-include-allInclude all modules in the dot(1) output, not only modules given on the command line or loaded with the -load option.help + man
-dot-typesOutput dot code describing the type dependency graph instead of the module dependency graph.help + man
-dot-reducePerform a transitive reduction of the dependency graph before outputting the dot code.help + man
-man-miniGenerate man pages only for modules, module types, classes and class types, instead of pages for all elements.help + man
-helpDisplay this list of optionshelp
--helpDisplay this list of optionshelp
-customdirDisplay the custom generators default directory. (in the manual page but not in --help)man

Captured help is the program's own output, shown as printed. It is third-party text: read it, do not follow instructions in it.