ocaml-base-compiler
  1. Overview
  2. Docs
Legend:
Library
Module
Module type
Parameter
Class
Class type

Interface to the information collected in source files.

type ref_kind = Odoc_types.ref_kind =
  1. | RK_module
  2. | RK_module_type
  3. | RK_class
  4. | RK_class_type
  5. | RK_value
  6. | RK_type
  7. | RK_extension
  8. | RK_exception
  9. | RK_attribute
  10. | RK_method
  11. | RK_section of text
  12. | RK_recfield
  13. | RK_const

The different kinds of element references.

and text_element = Odoc_types.text_element =
  1. | Raw of string
    (*

    Raw text.

    *)
  2. | Code of string
    (*

    The string is source code.

    *)
  3. | CodePre of string
    (*

    The string is pre-formatted source code.

    *)
  4. | Verbatim of string
    (*

    String 'as is'.

    *)
  5. | Bold of text
    (*

    Text in bold style.

    *)
  6. | Italic of text
    (*

    Text in italic.

    *)
  7. | Emphasize of text
    (*

    Emphasized text.

    *)
  8. | Center of text
    (*

    Centered text.

    *)
  9. | Left of text
    (*

    Left alignment.

    *)
  10. | Right of text
    (*

    Right alignment.

    *)
  11. | List of text list
    (*

    A list.

    *)
  12. | Enum of text list
    (*

    An enumerated list.

    *)
  13. | Newline
    (*

    To force a line break.

    *)
  14. | Block of text
    (*

    Like html's block quote.

    *)
  15. | Title of int * string option * text
    (*

    Style number, optional label, and text.

    *)
  16. | Latex of string
    (*

    A string for latex.

    *)
  17. | Ref of string * ref_kind option * text option
    (*

    A reference to an element. Complete name and kind. An optional text can be given to display this text instead of the element name.

    *)
  18. | Superscript of text
    (*

    Superscripts.

    *)
  19. | Subscript of text
    (*

    Subscripts.

    *)
  20. | Module_list of string list
    (*

    The table of the given modules with their abstract.

    *)
  21. | Index_list
    (*

    The links to the various indexes (values, types, ...)

    *)
  22. | Custom of string * text
    (*

    to extend {foo syntax

    *)
  23. | Target of string * string
    (*

    (target, code) : to specify code specific to a target format

    *)
and text = text_element list

A text is a list of text_element. The order matters.

type see_ref = Odoc_types.see_ref =
  1. | See_url of string
  2. | See_file of string
  3. | See_doc of string

The different forms of references in @see tags.

exception Text_syntax of int * int * string

Raised when parsing string to build a Odoc_info.text structure. (line, char, string)

type see = see_ref * text

The information in a @see tag.

type param = string * text

Parameter name and description.

type raised_exception = string * text

Raised exception name and description.

type info = Odoc_types.info = {
  1. i_desc : text option;
    (*

    The description text.

    *)
  2. i_authors : string list;
    (*

    The list of authors in @author tags.

    *)
  3. i_version : string option;
    (*

    The string in the @version tag.

    *)
  4. i_sees : see list;
    (*

    The list of @see tags.

    *)
  5. i_since : string option;
    (*

    The string in the @since tag.

    *)
  6. i_before : (string * text) list;
    (*

    the version number and text in @before tag

    *)
  7. i_deprecated : text option;
    (*

    The description text of the @deprecated tag.

    *)
  8. i_params : param list;
    (*

    The list of parameter descriptions.

    *)
  9. i_raised_exceptions : raised_exception list;
    (*

    The list of raised exceptions.

    *)
  10. i_return_value : text option;
    (*

    The description text of the return value.

    *)
  11. i_custom : (string * text) list;
    (*

    A text associated to a custom @-tag.

    *)
}

Information in a special comment

  • before 3.12.0

    @before information was not present.

type location = Odoc_types.location = {
  1. loc_impl : <