package ocaml-base-compiler

  1. Overview
  2. Docs

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

type t_value = Odoc_value.t_value = {
  1. val_name : Name.t;
    (*

    Complete name of the value.

    *)
  2. mutable val_info : info option;
    (*

    Information found in the optional associated comment.

    *)
  3. val_type : Types.type_expr;
    (*

    Type of the value.

    *)
  4. val_recursive : bool;
    (*

    true if the value is recursive.

    *)
  5. mutable val_parameters : Odoc_parameter.parameter list;
    (*

    The parameters, if any.

    *)
  6. mutable val_code : string option;
    (*

    The code of the value, if we had the only the implementation file.

    *)
  7. mutable val_loc : location;
}

Representation of a value.

type t_attribute = Odoc_value.t_attribute = {
  1. att_value : t_value;
    (*

    an attribute has almost all the same information as a value

    *)
  2. att_mutable : bool;
    (*

    true if the attribute is mutable.

    *)
  3. att_virtual : bool;
    (*

    true if the attribute is virtual.

    *)
}

Representation of a class attribute.

type t_method = Odoc_value.t_method = {
  1. met_value : t_value;
    (*

    a method has almost all the same information as a value

    *)
  2. met_private : bool;
    (*

    true if the method is private.

    *)
  3. met_virtual : bool;
    (*

    true if the method is virtual.

    *)
}

Representation of a class method.

val is_function : t_value -> bool

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

val value_parameter_text_by_name : t_value -> string -> text option

Access to the description associated to the given parameter name.

OCaml

Innovation. Community. Security.