Odoc_infoInterface to the information collected in source files.
type ref_kind = Odoc_types.ref_kind = | RK_module| RK_module_type| RK_class| RK_class_type| RK_value| RK_type| RK_extension| RK_exception| RK_attribute| RK_method| RK_section of text| RK_recfield| RK_constThe different kinds of element references.
and text_element = Odoc_types.text_element = | Raw of stringRaw text.
*)| Code of stringThe string is source code.
*)| CodePre of stringThe string is pre-formatted source code.
*)| Verbatim of stringString 'as is'.
*)| Bold of textText in bold style.
*)| Italic of textText in italic.
*)| Emphasize of textEmphasized text.
*)| Center of textCentered text.
*)| Left of textLeft alignment.
*)| Right of textRight alignment.
*)| List of text listA list.
*)| Enum of text listAn enumerated list.
*)| NewlineTo force a line break.
*)| Block of textLike html's block quote.
*)| Title of int * string option * textStyle number, optional label, and text.
*)| Latex of stringA string for latex.
*)| Link of string * textA reference string and the link text.
*)| Ref of string * ref_kind option * text optionA reference to an element. Complete name and kind. An optional text can be given to display this text instead of the element name.
*)| Superscript of textSuperscripts.
*)| Subscript of textSubscripts.
*)| Module_list of string listThe table of the given modules with their abstract.
*)| Index_listThe links to the various indexes (values, types, ...)
*)| Custom of string * textto extend {foo syntax
*)| Target of string * string(target, code) : to specify code specific to a target format
*)and text = text_element listA text is a list of text_element. The order matters.
The different forms of references in @see tags.
Raised when parsing string to build a Odoc_info.text structure. (line, char, string)
type param = string * textParameter name and description.
type raised_exception = string * textRaised exception name and description.
type info = Odoc_types.info = {i_desc : text option;The description text.
*)i_version : string option;The string in the @version tag.
*)i_sees : see list;The list of @see tags.
*)i_since : string option;The string in the @since tag.
*)i_before : (string * text) list;the version number and text in @before tag
*)i_deprecated : text option;The description text of the @deprecated tag.
*)i_params : param list;The list of parameter descriptions.
*)i_raised_exceptions : raised_exception list;The list of raised exceptions.
*)i_return_value : text option;The description text of the return value.
*)i_custom : (string * text) list;A text associated to a custom @-tag.
*)i_alerts : alert list;Alerts associated to the same item. Not from special comments.
*)}Information in a special comment
type location = Odoc_types.location = {loc_impl : Location.t option;implementation location
*)loc_inter : Location.t option;interface location
*)}Location of elements in implementation and interface files.
val dummy_loc : locationA dummy location.
module Name : sig ... endRepresentation of element names.
module Parameter : sig ... endRepresentation and manipulation of method / function / class / module parameters.
module Extension : sig ... endRepresentation and manipulation of extensions.
module Exception : sig ... endRepresentation and manipulation of exceptions.
module Type : sig ... endRepresentation and manipulation of types.
module Value : sig ... endRepresentation and manipulation of values, class attributes and class methods.
module Class : sig ... endRepresentation and manipulation of classes and class types.
module Module : sig ... endRepresentation and manipulation of modules and module types.
This function is used to reset the names of type variables. It must be called when printing the whole type of a function, but not when printing the type of its parameters. Same for classes (call it) and methods and attributes (don't call it).
val string_of_variance : Type.t_type -> Types.Variance.t -> stringstring_of_variance t variance returns the variance and injectivity annotation (e.g "+" for covariance, "-" for contravariance, "!-" for injectivity) if the type t is abstract.
val string_of_type_expr : Types.type_expr -> stringThis function returns a string representing a Types.type_expr.
val string_of_class_params : Class.t_class -> stringval string_of_type_list : ?par:bool -> string -> Types.type_expr list -> stringThis function returns a string to represent the given list of types, with a given separator.
val string_of_type_param_list : Type.t_type -> stringThis function returns a string to represent the list of type parameters for the given type.
val string_of_type_extension_param_list : Extension.t_type_extension -> stringThis function returns a string to represent the list of type parameters for the given type extension.
val string_of_class_type_param_list : Types.type_expr list -> stringThis function returns a string to represent the given list of type parameters of a class or class type, with a given separator.
val string_of_module_type :
?code:string ->
?complete:bool ->
Types.module_type ->
stringThis function returns a string representing a Types.module_type.
val string_of_class_type : ?complete:bool -> Types.class_type -> stringThis function returns a string representing a Types.class_type.
val string_of_text : text -> stringGet a string from a text.
val string_of_info : info -> stringGet a string from an info structure.
val string_of_type : Type.t_type -> stringval string_of_record : Type.record_field list -> stringval string_of_type_extension : Extension.t_type_extension -> stringval string_of_exception : Exception.t_exception -> stringval string_of_value : Value.t_value -> stringval string_of_attribute : Value.t_attribute -> stringval string_of_method : Value.t_method -> stringReturn the first sentence (until the first dot followed by a blank or the first blank line) of a text. Don't stop in the middle of Code, CodePre, Verbatim, List, Enum, Latex, Link, Ref, Subscript or Superscript.
Return the first sentence (until the first dot followed by a blank or the first blank line) of a text, and the remaining text after. Don't stop in the middle of Code, CodePre, Verbatim, List, Enum, Latex, Link, Ref, Subscript or Superscript.
concat sep l concats the given list of text l, each separated with the text sep.
Return the list of titles in a text. A title is a title level, an optional label and a text.
Take a sorted list of elements, a function to get the name of an element and return the list of list of elements, where each list group elements beginning by the same letter. Since the original list is sorted, elements whose name does not begin with a letter should be in the first returned list.
val remove_option : Types.type_expr -> Types.type_exprTake a type and remove the option top constructor. This is useful when printing labels, we then remove the top option constructor for optional labels.
val is_optional : Asttypes.arg_label -> boolReturn true if the given label is optional.
val label_name : Asttypes.arg_label -> stringReturn the label name for the given label, i.e. removes the beginning '?' if present.
Return the given name where the module name or part of it was removed, according to the list of modules which must be hidden (cf Odoc_args.hidden_modules)
Print a warning message to stderr. If warnings must be treated as errors, then the error counter is incremented.
val print_warnings : bool refA flag to indicate whether ocamldoc warnings must be printed or not.
val errors : int refIncrement this counter when an error is encountered. The ocamldoc tool will print the number of errors encountered exit with code 1 if this number is greater than 0.
Apply a function to a first value if it is not different from a second value. If the two values are different, return the second one.
val text_of_string : string -> texttext_of_string s returns the text structure from the given string.
val text_string_of_text : text -> stringtext_string_of_text text returns the string representing the given text. This string can then be parsed again by Odoc_info.text_of_string.
val info_of_string : string -> infoinfo_of_string s parses the given string like a regular ocamldoc comment and return an Odoc_info.info structure.
val info_of_comment_file : Module.t_module list -> string -> infoinfo_of_comment_file file parses the given file and return an Odoc_info.info structure. The content of the file must have the same syntax as the content of a special comment. The given module list is used for cross reference.
remove_ending_newline s returns s without the optional ending newline.
module Search : sig ... endResearch in elements
module Scan : sig ... endScanning of collected information
module Dep : sig ... endComputation of dependencies.
module Global : sig ... endval analyse_files :
?merge_options:Odoc_types.merge_option list ->
?include_dirs:string list ->
?hidden_include_dirs:string list ->
?labels:bool ->
?sort_modules:bool ->
?no_stop:bool ->
?init:Odoc_module.t_module list ->
Odoc_global.source_file list ->
Module.t_module listAnalysis of the given source files.
Dump of a list of modules into a file.