package odoc
Install
    
    dune-project
 Dependency
Authors
Maintainers
Sources
sha256=ce84fa7e0cc5f3e8a54e6adeb10826152798b602057b9e46c5ae7e5d5206812b
    
    
  sha512=9febd413450ca2e3824c9ef7e1c9ae8d8094aa72ed71327a69d8d6b42f6f197b3f3f40d674de0d11fa1242ee0df95c693b5d74467d530704e1339f3a523452f6
    
    
  doc/index.html
The odoc documentation generator
For a quick look at the odoc syntax, see the cheatsheet!
What is odoc?
odoc is a documentation generator for OCaml. It reads doc comments from your source files and your .mld files, then outputs HTML, LaTeX and man pages. The pages you are reading now are rendered using odoc.
Text inside doc comments (delimited by (** ... *)) is marked up in odoc syntax:
val float_dsig : int -> float t
(** [float_dsig d] rounds the normalised {e decimal} significand
    of the float to the [d]th decimal fractional digit and formats
    the result with ["%g"]. Ties are rounded towards positive
    infinity. The result is NaN on infinities and only defined for
    [0 <= d <= 16].
    {b Warning.} The current implementation overflows on large [d]
    and floats. *)These comments are picked up by odoc and turned into HTML, LaTeX, or manpages.
The syntax reference is a refinement of that explained in the OCaml manual. The differences are described here.
odoc's main advantages over OCamldoc are:
- an accurate cross-referencer that can calculate links between types, modules, module types, and more. So if you've ever been baffled by exactly what the 
twas inval f : A(M).t -> unit,odocwill link to it! - an expander, which can expand complex module-type expressions while preserving their structure, including comment, includes, and more. If you've ever wondered what values there are in your module 
M : Base.Applicative.S with type t := u,odocwill show you! 
For Authors
For guidance on how to document your OCaml project, see odoc_for_authors.
For Integrators
To integrate odoc into your tool, webpage or any other setting, you'll need to understand how to drive odoc.