Up

module DocOckComponentTbl

: sig

Tables

#
type 'a t

The type of tables of components

#
val create : ?equal:('a -> 'a -> bool) -> ?hash:('a -> int) -> ('a DocOckTypes.Unit.t -> string -> 'a option) -> ('a -> 'a DocOckTypes.Unit.t) -> 'a t

Create a table of the components of units. Optionally provide equality and hash functons.

Identifier Lookup

#
val signature_identifier : 'a t -> 'a DocOckPaths.Identifier.signature -> 'a DocOckComponents.Sig.t

Lookup the components of a signature identifier

#
val class_signature_identifier : 'a t -> 'a DocOckPaths.Identifier.class_signature -> 'a DocOckComponents.ClassSig.t

Lookup the components of a class signature identifier

#
val datatype_identifier : 'a t -> 'a DocOckPaths.Identifier.type_ -> 'a DocOckComponents.Datatype.t

Lookup the components of a datatype identifier

Path Lookup

TODO: One day we will be able to remove the unit argument.

#
val resolved_module_path : 'a t -> 'a DocOckTypes.Unit.t -> 'a DocOckPaths.Path.Resolved.module_ -> 'a DocOckComponents.Sig.t

Lookup the components of a resolved module path

TODO: One day we will be able to remove the unit argument.

#
val resolved_module_type_path : 'a t -> 'a DocOckTypes.Unit.t -> 'a DocOckPaths.Path.Resolved.module_type -> 'a DocOckComponents.Sig.t

Lookup the components of a resolved module type path

TODO: One day we will be able to remove the unit argument.

#
val resolved_class_type_path : 'a t -> 'a DocOckTypes.Unit.t -> 'a DocOckPaths.Path.Resolved.class_type -> 'a DocOckComponents.ClassSig.t

Lookup the components of a resolved class type path

#
val module_path : 'a t -> 'a DocOckTypes.Unit.t -> 'a DocOckPaths.Path.module_ -> 'a DocOckComponents.Sig.t

Lookup the components of a module path, needed for module applications.

Fragment Lookup

#
type 'a with_

Table specialised to lookup fragments based on a module expression or path.

#
val module_type_expr_with : 'a t -> 'a DocOckTypes.Unit.t -> 'a DocOckTypes.ModuleType.expr -> 'a with_

Create specialised fragment table for a module type expression

#
val module_type_path_with : 'a t -> 'a DocOckTypes.Unit.t -> 'a DocOckPaths.Path.module_type -> 'a with_

Create specialised fragment table for a module path

#
val resolved_signature_fragment : 'a with_ -> 'a DocOckPaths.Fragment.Resolved.signature -> 'a DocOckComponents.Sig.t

Lookup the components of a resolved module fragment

Reference Lookup

#
val resolved_signature_reference : 'a t -> 'a DocOckPaths.Reference.Resolved.signature -> 'a DocOckComponents.Sig.t

Lookup the components of a resolved signature reference

#
val resolved_class_signature_reference : 'a t -> 'a DocOckPaths.Reference.Resolved.class_signature -> 'a DocOckComponents.ClassSig.t

Lookup the components of a resolved class signature reference

#
val resolved_datatype_reference : 'a t -> 'a DocOckPaths.Reference.Resolved.datatype -> 'a DocOckComponents.Datatype.t

Lookup the components of a resolved datatype reference

Root lookup

#
val base : 'a t -> 'a DocOckTypes.Unit.t -> string -> 'a option

Lookup the base of a unit name

end