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 moduleEmptyAlias A plain module alias of EmptyOdoc 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 ... endA plain, empty module
module type Empty = sig ... endAn ambiguous, misnamed module type
module type MissingComment = sig ... endAn ambiguous, misnamed module type
module EmptyAlias = EmptyA plain module alias of Empty
module type EmptySig = sig ... endA plain, empty module signature
module type EmptySigAlias = EmptySigA plain, empty module signature alias of
module ModuleWithSignature : EmptySigA plain module of a signature of EmptySig (reference)
module ModuleWithSignatureAlias : EmptySigAliasA plain module with an alias signature
module One : sig ... endmodule type SigForMod = sig ... endThere's a signature in a module in this signature.
module type SuperSig = sig ... endFor 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 ... endReferences 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_functionmodule CollectionModule : sig ... endThis comment is for CollectionModule.
module type COLLECTION = module type of CollectionModulemodule type of
module Recollection
  (C : COLLECTION) : 
  COLLECTION
    with type collection = C.element list
     and type element = C.collectionThis comment is for CollectionModule.
module type MMM = sig ... endmodule type RECOLLECTION = MMM with module C = Recollection(CollectionModule)module type RecollectionModule = sig ... endmodule type A = sig ... endmodule type B = sig ... endmodule type C = sig ... endThis module type includes two signatures.
module FunctorTypeOf
  (Collection : module type of CollectionModule) : 
  sig ... endThis comment is for FunctorTypeOf.
module type IncludeModuleType = sig ... endThis comment is for IncludeModuleType.
module type ToInclude = sig ... endThis 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_gadtThis comment is for partial_gadt.
Wow! It was a mixed GADT!
type alias = variantThis comment is for alias.
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_variant2type ('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_aliasThis 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_aliasThis 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_aThis 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 ... endtype my_mod = (module COLLECTION)A brown paper package tied up with string
class empty_class : object ... endclass one_method_class : object ... endclass two_method_class : object ... endclass 'a param_class : 'a -> object ... endtype my_unit_object = unit param_classtype 'a my_unit_class = unit param_class as 'amodule Dep1 : sig ... endtype dep1 = Dep2(Dep1).B.cmodule Dep3 : sig ... endmodule Dep4 : sig ... endtype dep2 = Dep5(Dep4).Z.X.btype dep3 = Dep5(Dep4).Z.Y.amodule Dep6 : sig ... endtype dep4 = Dep7(Dep6).M.Y.dmodule Dep8 : sig ... endmodule type Dep10 = Dep9(Dep8).T with type t = intmodule Dep11 : sig ... endmodule Dep13 : Dep12(Dep11).Ttype dep5 = Dep13.cmodule type With1 = sig ... endmodule With2 : sig ... endtype with1 = With3.N.ttype with2 = With4.N.tmodule With5 : sig ... endmodule With6 : sig ... endmodule With9 : sig ... endmodule With10 : sig ... endmodule type With11 = With7(With10).T with module M = With9 and type N.t = intmodule type NestedInclude1 = sig ... endinclude NestedInclude1module type NestedInclude2 = sig ... endinclude NestedInclude2 with type nested_include = intmodule DoubleInclude1 : sig ... endmodule DoubleInclude3 : sig ... endinclude module type of DoubleInclude3.DoubleInclude2module IncludeInclude1 : sig ... endinclude module type of IncludeInclude1module type IncludeInclude2 = sig ... endmodule IncludeInclude2_M : sig ... endinclude IncludeInclude2With 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 ... endSome 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 ... endLet's imitate jst's layout.
I can refer to
{!section:indexmodules} : Trying the {!modules: ...} command.{!aliases} : Aliases againBut also to things in submodules:
{!section:SuperSig.SubSigA.subSig} : A Labeled Section Header Inside of a Signature{!Aliases.incl} : include of FooAnd just to make sure we do not mess up:
module type M = sig ... endmodule M : sig ... endHere 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.tmodule type TypeExt = sig ... endmodule type TypeExtPruned = TypeExt with type t := new_tmodule Op : sig ... end