package ocaml-base-compiler

  1. Overview
  2. Docs
Legend:
Library
Module
Module type
Parameter
Class
Class type

Representation and manipulation of values, class attributes and class methods.

module Name = Odoc_name

Types

type t_value = {
  1. val_name : Name.t;
  2. mutable val_info : Odoc_types.info option;
  3. val_type : Types.type_expr;
  4. val_recursive : bool;
  5. mutable val_parameters : Odoc_parameter.parameter list;
  6. mutable val_code : string option;
  7. mutable val_loc : Odoc_types.location;
}

Representation of a value.

type t_attribute = {
  1. att_value : t_value;
  2. att_mutable : bool;
  3. att_virtual : bool;
}

Representation of a class attribute.

type t_method = {
  1. met_value : t_value;
  2. met_private : bool;
  3. met_virtual : bool;
}

Representation of a class method.

Functions

val value_parameter_text_by_name : t_value -> string -> Odoc_types.text option

Returns the text associated to the given parameter name in the given value, or None.

val update_value_parameters_text : t_value -> unit

Update the parameters text of a t_value, according to the val_info field.

val dummy_parameter_list : Types.type_expr -> Odoc_parameter.param_info list

Create a list of parameters with dummy names "??" from a type list. Used when we want to merge the parameters of a value, from the .ml and the .mli file. In the .mli file we don't have parameter names so there is nothing to merge. With this dummy list we can merge the parameter names from the .ml and the type from the .mli file.

val is_function : t_value -> bool

Return true if the value is a function, i.e. has a functional type.