• en

Module OcamlaryTestLibrary

This is an interface with all of the module system features.
This text is centered.
This text is left-aligned.
This text is right-aligned.
This documentation demonstrates:
  • comment formatting
  • unassociated comments
  • documentation sections
  • module system documentation including
    1. submodules
    2. module aliases
    3. module types
    4. module type aliases
    5. modules with signatures
    6. modules with aliased signatures
David Sheets is the author.
Author David Sheets
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: TARGET NONE: $e^{i\pi} = -1$
Here is an index table of Empty modules: REF_LINK NONE: Empty EmptyAlias
Here is a table of links to indexes: TODO: special-ref
Here is some superscript: x2
Here is some subscript: x0
Here are some escaped brackets: { [ @ ] }
An unassociated comment

Level 0

Level 1

Level 2

Level 3

Level 4

Level 5
Level 6
Level 7
Level 8
Level 9

Basic module stuff

module Empty : sig
A plain, empty module
This module has a signature without any members.
end
module type MissingComment = sig
An ambiguous, misnamed module type
type t
end
Level 9000
module EmptyAlias = Empty
A plain module alias of Empty

EmptySig

module type EmptySig = sig
A plain, empty module signature
type not_actually_empty
end
module type EmptySigAlias = EmptySig
A plain, empty module signature alias of
EmptySig
(preformatted).
module ModuleWithSignature : EmptySig
A plain module of a signature of EmptySig (reference)
module ModuleWithSignatureAlias : EmptySigAlias
A plain module with an alias signature
Deprecated I don't like this element any more.
module One : sig
type one
end
module type SigForMod = sig
There's a signature in a module in this signature.
module Inner : sig
module type Empty = sig
end
end
end
module type SuperSig = sig
module type SubSigA = sig

A Labeled Section Header Inside of a Signature

type t
module SubSigAMod : sig
type sub_sig_a_mod
end
end
module type SubSigB = sig

Another Labeled Section Header Inside of a Signature

type t
end
module type EmptySig = sig
type not_actually_empty
end
end
For a good time, see SuperSig.SubSigA.subSig or SuperSig.SubSigB.subSig or SuperSig.EmptySig. Section s9000 is also interesting. EmptySig is a general reference but TODO: ref:emptySig is the section and EmptySig is the module signature.
Some text before exception title.

Basic exception stuff

After exception title.
exception Kaboom of unit
Unary exception constructor
exception Kablam of unit * unit
Binary exception constructor
exception Kapow of (unit * unit)
Unary exception constructor over binary tuple
exception EmptySig
EmptySig is general but EmptySig is a module and TODO: ref:EmptySig is this exception.
exception EmptySigAlias
TODO: ref:EmptySigAlias is this exception.

Basic type and value stuff with advanced doc comments

type ('a, 'b) a_function = 'a -> 'b
a_function is general but a_function is this type and a_function is the value below.
val a_function : x:int -> int
This is a_function with param and return type.
x the x coordinate
Returns the y coordinate
val fun_fun_fun : ((int, int) a_function, (unit, unit) a_function) a_function
val fun_maybe : ?yes:unit -> unit -> int
val not_found : unit -> unit
Raises Not_found That's all it does
val ocaml_org : string
See also The OCaml Web site
val some_file : string
See also The file called some_file
val some_doc : string
See also The document called some_doc
val since_mesozoic : unit
This value was introduced in the Mesozoic era.
Since mesozoic
val changing : unit
This value has had changes in 1.0.0, 1.1.0, and 1.2.0.
Before 1.0.0 before 1.0.0
Before 1.1.0 before 1.1.0
Version 1.2.0
val with_foo : unit
This value has a custom tag foo.
Foo the body of the custom foo tag

Some Operators

val (~-) : unit
val (!) : unit
val (@) : unit
val ($) : unit
val (%) : unit
val (^) : unit
val (&) : unit
val (*) : unit
val (-) : unit
val (+) : unit
val (<) : unit
val (>) : unit
val (-?) : unit
val (/) : unit
val (-|) : unit
val := : unit
val (=) : unit
I'm hidden

Advanced Module Stuff

module CollectionModule : sig
This comment is for CollectionModule.
type collection
This comment is for collection.
This comment is for InnerModuleA.
module InnerModuleA : sig
This comment is for InnerModuleTypeA.
type t = collection
This comment is for t.
This comment is for InnerModuleA'.
module InnerModuleA' : sig
type t = (unit, unit) a_function
This comment is for t.
end
module type InnerModuleTypeA' = sig
This comment is for InnerModuleTypeA'.
type t = InnerModuleA'.t
This comment is for t.
end
end
module type InnerModuleTypeA = InnerModuleA.InnerModuleTypeA'
end
TODO: functor:ocamlary-test-library.0.0.0/ocamlary-test-library/OcamlaryTestLibrary.FunctorTypeOf
module type IncludeModuleType = sig
This comment is for IncludeModuleType.
TODO: ocamlary-test-library.0.0.0/ocamlary-test-library/OcamlaryTestLibrary
end

Advanced Type Stuff

type record = {
field1 : int; (* This comment is for field1. *)
field2 : int; (* This comment is for field2. *)
}
This comment is for record.
This comment is also for record.
type variant =
| TagA (* This comment is for TagA. *)
| ConstrB of int (* This comment is for ConstrB. *)
| ConstrC of int * int (* This comment is for binary ConstrC. *)
| ConstrD of (int * int) (* This comment is for unary ConstrD of binary tuple. *)
This comment is for variant.
This comment is also for variant.
type poly_variant = TODO: a
This comment is for poly_variant.
Wow! It was a polymorphic variant!
type (_, _) full_gadt =
| Tag : (unit, unit) full_gadt
| First : 'a -> ('a, unit) full_gadt
| Second : 'a0 -> (unit, 'a0) full_gadt
| Exist : 'b -> (unit, unit) full_gadt
This comment is for full_gadt.
Wow! It was a GADT!
type 'a0 partial_gadt =
| AscribeTag : 'a partial_gadt
| OfTag of 'a0 partial_gadt
| ExistGadtTag : 'a1 -> 'b -> 'a1 partial_gadt
This comment is for partial_gadt.
Wow! It was a mixed GADT!
type alias = variant
This comment is for alias.
type tuple = ((alias * alias) * alias * (alias * alias))
This comment is for tuple.
type variant_alias = variant =
| TagA
| ConstrB of int
| ConstrC of int * int
| ConstrD of (int * int)
This comment is for variant_alias.
type record_alias = record = {
field1 : int;
field2 : int;
}
This comment is for record_alias.
type poly_variant_union = TODO: a
This comment is for poly_variant_union.
type ('a1, 'b0) full_gadt_alias = ('a1, 'b0) full_gadt =
| Tag : (unit, unit) full_gadt_alias
| First : 'a -> ('a, unit) full_gadt_alias
| Second : 'a0 -> (unit, 'a0) full_gadt_alias
| Exist : 'b -> (unit, unit) full_gadt_alias
This comment is for full_gadt_alias.
type 'a0 partial_gadt_alias = 'a0 partial_gadt =
| AscribeTag : 'a partial_gadt_alias
| OfTag of 'a0 partial_gadt_alias
| ExistGadtTag : 'a1 -> 'b -> 'a1 partial_gadt_alias
This comment is for partial_gadt_alias.
exception Exn_arrow : unit -> exn
This comment is for Exn_arrow.
type mutual_constr_a =
| A
| B_ish of mutual_constr_b
This comment is for mutual_constr_a and mutual_constr_b.
type mutual_constr_b =
| B
| A_ish of mutual_constr_a
TODO: ocamlary-test-library.0.0.0/ocamlary-test-library/OcamlaryTestLibrary