package ocaml-base-compiler

  1. Overview
  2. Docs
Official release 4.14.2

Install

Dune Dependency

Authors

Maintainers

Sources

4.14.2.tar.gz
sha256=c2d706432f93ba85bd3383fa451d74543c32a4e84a1afaf3e8ace18f7f097b43

doc/odoc_info/Odoc_info/Parameter/index.html

Module Odoc_info.Parameter

Representation and manipulation of method / function / class / module parameters.

Types

type simple_name = Odoc_parameter.simple_name = {
  1. sn_name : string;
  2. sn_type : Types.type_expr;
  3. mutable sn_text : text option;
}

Representation of a simple parameter name

type param_info = Odoc_parameter.param_info =
  1. | Simple_name of simple_name
  2. | Tuple of param_info list * Types.type_expr

Representation of parameter names. We need it to represent parameter names in tuples. The value Tuple ([], t) stands for an anonymous parameter.

type parameter = param_info

A parameter is just a param_info.

Functions

val complete_name : parameter -> string

Access to the name as a string. For tuples, parentheses and commas are added.

Access to the complete type.

val names : parameter -> string list

Access to the list of names ; only one for a simple parameter, or a list for a tuple.

val desc_by_name : parameter -> string -> text option

Access to the description of a specific name.

  • raises Not_found

    if no description is associated to the given name.

val type_by_name : parameter -> string -> Types.type_expr

Access to the type of a specific name.

  • raises Not_found

    if no type is associated to the given name.

OCaml

Innovation. Community. Security.