OcamlaryThis is an interface with all of the module system features. This documentation demonstrates:
module system documentation including
A numbered list:
David Sheets is the author.
You may find more information about this HTML documentation renderer at github.com/dsheets/ocamlary .
This is some verbatim text:
verbatim
This is some verbatim text:
[][df[]]}}
Here is some raw LaTeX:
Here is an index table of Empty modules:
Empty 
     A plain, empty module
    EmptyAlias 
     A plain module alias of Empty
    Odoc doesn't support {!indexlist}.
Here is some superscript: x2
Here is some subscript: x0
Here are some escaped brackets: { [ @ ] }
Here is some emphasis followed by code.
An unassociated comment
      module 
       Empty
      
       : sig ... 
       end
      
     
    A plain, empty module
      module 
       type 
       Empty
      
       = sig ... 
       end
      
     
    An ambiguous, misnamed module type
      module 
       type 
       MissingComment
      
       = sig ... 
       end
      
     
    An ambiguous, misnamed module type
module EmptyAlias
       = Empty
     
    A plain module alias of Empty
      module 
       type 
       EmptySig
      
       = sig ... 
       end
      
     
    A plain, empty module signature
      module 
       type EmptySigAlias
      
       = EmptySig
      
     
    A plain, empty module signature alias of
      module 
       ModuleWithSignature
      
       : EmptySig
      
     
    A plain module of a signature of 
      EmptySig
       (reference)
     
      module 
       
        ModuleWithSignatureAlias
       
      
       : EmptySigAlias
      
     
    A plain module with an alias signature
      module 
       One
      
       : sig ... 
       end
      
     
    
      module 
       type 
       SigForMod
      
       = sig ... 
       end
      
     
    There's a signature in a module in this signature.
      module 
       type 
       SuperSig
      
       = sig ... 
       end
      
     
    For a good time, see 
    A Labeled Section Header Inside of a Signature
     or 
    Another Labeled Section Header Inside of a Signature
     or 
    
     SuperSig.EmptySig
    . Section Section 9000 is 
    also interesting. EmptySig
     is the section and 
    EmptySig
     is the module signature.
   
      module 
       Buffer
      
       : sig ... 
       end
      
     
    References are resolved after everything, so {!Buffer.t}
       won't resolve.
     
Some text before exception title.
After exception title.
EmptySigAlias
       is this exception.
     
a_function is this
       type and a_function
       is the value below.
     
      val fun_fun_fun : 
       
        (
         (int, int) 
          a_function
         , 
         (unit, unit) 
          a_function
         )
         a_function
       
      
     
    
      module 
       CollectionModule
      
       : sig ... 
       end
      
     
    This comment is for CollectionModule.
      module 
       type 
       COLLECTION
      
       = module 
       type of
        CollectionModule
      
     
    module type of
      module 
       Recollection
      
      
              
       (C : 
       COLLECTION)
        : 
            
       COLLECTION
                                                                        
       with 
       type 
        
         collection
         = 
        
         
          C.element
          list
        
       
                  
        and 
       type 
        element
         = 
        
         C.collection
        
       
      
     
    This comment is for CollectionModule.
      module 
       type 
       MMM
      
       = sig ... 
       end
      
     
    
      module 
       type 
       RECOLLECTION
      
       = MMM 
       with 
       module 
        C = 
        Recollection(CollectionModule)
        
       
      
     
    
      module 
       type 
       
        RecollectionModule
       
      
       = sig ... 
       end
      
     
    
      module 
       type 
       A
      
       = sig ... 
       end
      
     
    
      module 
       type 
       B
      
       = sig ... 
       end
      
     
    
      module 
       type 
       C
      
       = sig ... 
       end
      
     
    This module type includes two signatures.
      module 
       FunctorTypeOf
      
      
              
       (
       Collection
        : module 
       type of
        CollectionModule
       ) : 
             
       sig ... end
      
     
    This comment is for FunctorTypeOf.
      module 
       type 
       
        IncludeModuleType
       
      
       = sig ... 
       end
      
     
    This comment is for IncludeModuleType.
      module 
       type 
       ToInclude
      
       = sig ... 
       end
      
     
    This comment is for poly_variant.
Wow! It was a polymorphic variant!
      type 'a partial_gadt
       = 
     
     | 
        AscribeTag : 
         'a 
          partial_gadt
         
        
       
      | 
        OfTag 
         of 
         'a 
          partial_gadt
         
        
       
      | 
        ExistGadtTag : 
         (
          'a 
           ->
           'b)
          -> 
         'a 
          partial_gadt
         
        
       
      This comment is for partial_gadt.
Wow! It was a mixed GADT!
type alias
       = variant
     
    This comment is for alias.
type variant_alias
       = variant = 
     
     
    This comment is for variant_alias.
This comment is for record_alias.
This comment is for poly_variant_union.
      type 
       'a open_poly_variant_alias
      
       = 
       
        'a 
         open_poly_variant
         open_poly_variant2
       
      
     
    
      type 
       ('a, 'b) full_gadt_alias
      
       = 
       
        ('a, 
         'b)
         full_gadt
       
       = 
     
     | 
        Tag : 
         (unit, unit) 
          full_gadt_alias
         
        
       
      | 
        First : 
         'a 
         -> 
         ('a, unit) 
          full_gadt_alias
         
        
       
      | 
        Second : 
         'a 
         -> 
         (unit, 'a) 
          full_gadt_alias
         
        
       
      | 
        Exist : 
         'a * 'b
          -> 
         ('b, unit) 
          full_gadt_alias
         
        
       
      This comment is for full_gadt_alias.
      type 
       'a partial_gadt_alias
      
       = 
       'a 
        partial_gadt
       
       = 
     
     | 
        AscribeTag : 
         'a 
          partial_gadt_alias
         
        
       
      | 
        OfTag 
         of 
         'a 
          partial_gadt_alias
         
        
       
      | 
        ExistGadtTag : 
         (
          'a 
           ->
           'b)
          -> 
         'a 
          partial_gadt_alias
         
        
       
      This comment is for partial_gadt_alias.
This comment is for 
      Exn_arrow.
     
This comment is for 
      mutual_constr_a
       then mutual_constr_b
      .
     
and mutual_constr_b
       = 
     
     | B
       
      | 
        A_ish 
         of 
         mutual_constr_a
        
       
       This comment must be here for the next to associate correctly.
*)This comment is for 
      mutual_constr_b
       then mutual_constr_a
      .
     
type rec_obj
       = 
       < f : int ; g : 
        unit -> unit ; 
        h : rec_obj >
       
      
     
    
      module 
       ExtMod
      
       : sig ... 
       end
      
     
    type my_mod
       = 
       (module 
        COLLECTION
        )
       
      
     
    A brown paper package tied up with string
class 
      empty_class
       : object ... 
       end
      
     
    class 
      
       one_method_class
      
       : object ... 
       end
      
     
    class 
      
       two_method_class
      
       : object ... 
       end
      
     
    class 'a 
      param_class
       : 
       'a 
        ->
        object ... 
       end
      
     
    type my_unit_object
       = 
       unit param_class
       
      
     
    
      type 'a my_unit_class
      
       = 
       unit param_class
        as 'a
      
     
    
      module 
       Dep1
      
       : sig ... 
       end
      
     
    type dep1
       = 
       Dep2(Dep1).B.c
      
     
    
      module 
       Dep3
      
       : sig ... 
       end
      
     
    
      module 
       Dep4
      
       : sig ... 
       end
      
     
    type dep2
       = 
       Dep5(Dep4).Z.X.b
      
     
    type dep3
       = Dep5(Dep4).Z.Y.a
      
     
    
      module 
       Dep6
      
       : sig ... 
       end
      
     
    type dep4
       = 
       Dep7(Dep6).M.Y.d
       
      
     
    
      module 
       Dep8
      
       : sig ... 
       end
      
     
    
      module 
       type 
       Dep10
      
       = Dep9(Dep8).T
        with 
       type 
        t = int
       
      
     
    
      module 
       Dep11
      
       : sig ... 
       end
      
     
    
      module 
       Dep13
      
       : Dep12(Dep11).T
      
     
    type dep5
       = 
       Dep13.c
      
     
    
      module 
       type 
       With1
      
       = sig ... 
       end
      
     
    
      module 
       With2
      
       : sig ... 
       end
      
     
    type with1
       = With3.N.t
     
    type with2
       = With4.N.t
     
    
      module 
       With5
      
       : sig ... 
       end
      
     
    
      module 
       With6
      
       : sig ... 
       end
      
     
    
      module 
       With9
      
       : sig ... 
       end
      
     
    
      module 
       With10
      
       : sig ... 
       end
      
     
    
      module 
       type 
       With11
      
       = 
       With7(With10).T
        with 
       module 
        M = 
        With9
        and 
       type 
        N.t = 
        int
       
      
     
    
      module 
       type 
       NestedInclude1
      
       = sig ... 
       end
      
     
    
       include 
        NestedInclude1
       
      
     
        module 
         type 
         NestedInclude2
         
        
         = sig ... 
         end
        
       
      
       include 
        NestedInclude2
         with 
        type 
         
          nested_include
          = int
        
       
      
     
      module 
       DoubleInclude1
      
       : sig ... 
       end
      
     
    
      module 
       DoubleInclude3
      
       : sig ... 
       end
      
     
    
       include 
        module type
         of 
        
         DoubleInclude3.DoubleInclude2
        
       
      
     
      module 
       IncludeInclude1
      
       : sig ... 
       end
      
     
    
       include 
        module type
         of 
        IncludeInclude1
       
      
     
        module 
         type 
         IncludeInclude2
         
        
         = sig ... 
         end
        
       
      
        module 
         IncludeInclude2_M
        
         : sig ... 
         end
        
       
      
       include 
        IncludeInclude2
        
       
      
     With ocamldoc, toplevel units will be linked and documented, while submodules will behave as simple references.
With odoc, everything should be resolved (and linked) but only toplevel units will be documented.
Dep1.X Ocamlary.IncludeInclude1
      
    Ocamlary 
     This is an interface with all
       of the module system features. This documentation 
      demonstrates:
     
    
      module 
       CanonicalTest
      
       : sig ... 
       end
      
     
    Some ref to 
    
     CanonicalTest.Base_Tests.C.t
     and 
    
     CanonicalTest.Base_Tests.L.id
    . But also to 
    
     CanonicalTest.Base.List
     and 
    
     CanonicalTest.Base.List.t
    
   
      module 
       Aliases
      
       : sig ... 
       end
      
     
    Let's imitate jst's layout.
I can refer to
{!section:indexmodules} : 
     Trying the {!modules:
       ...} command.
     
    {!aliases} : 
     Aliases again
    But also to things in submodules:
{!section:SuperSig.SubSigA.subSig} : 
     A Labeled Section Header Inside of a Signature
     
    {!Aliases.incl} : 
     include of Foo
    And just to make sure we do not mess up:
{{!section:indexmodules}A} : 
     A
    {{!aliases}B} : B
    {{!section:SuperSig.SubSigA.subSig}C} : 
     C
     
    {{!Aliases.incl}D} : 
     D
    
      module 
       type 
       M
      
       = sig ... 
       end
      
     
    
      module 
       M
      
       : sig ... 
       end
      
     
    Here goes:
      module 
       Only_a_module
      
       : sig ... 
       end
      
     
    {!Only_a_module.t} : 
     
      Only_a_module.t
     
    {!module-Only_a_module.t} : 
     
      Only_a_module.t
     
    {!module-Only_a_module.type-t} : 
     
      Only_a_module.t
     
    {!type:Only_a_module.t} : 
     
      Only_a_module.t
     
    
      module 
       type 
       TypeExt
      
       = sig ... 
       end
      
     
    
      module 
       type 
       TypeExtPruned
      
       = TypeExt
        with 
       type 
        t := 
        new_t
       
      
     
    
      module 
       Op
      
       : sig ... 
       end