Module Rtt_type

module Rtt_type: sig .. end
Runtime representation of types.

This module is the public interface for the runtime representation types. These types are mostly an adaptation of types found in the Types module of the compiler.

Runtime representation of types

type primitive_type = 
| Int
| Char
| String
| Float
| Bool
| Unit
| Exn
| Array
| Format6
| Nativeint
| Int32
| Int64
| Lazy_t
type label = string 
type commutable = 
| Cok
| Cunknown
type rttype = 
| Tvar of string (*type variable interpreted in a universal sense*)
| Tarrow of label * rttype * rttype * commutable
| Ttuple of rttype list
| Tconstr of type_declaration * rttype list
| Tvariant of (string * int * rttype option) list
| Tlink of rttype (*backward branch encoding a recursive type*)
| Tparam of string (*parameter of the enclosing Rtt_type.type_declaration*)
| Tunknown (*generated in some cases of polymorphic non-functional values*)
The type of runtime representations of types

Runtime representation of type constructor declarations

type type_declaration = {
   type_params :string list;
   type_arity :int;
   type_kind :type_kind;
   type_name :string; (*short name of the type constructor*)
   type_static_id :int; (*id of the "code" of this type, shared among multiple applications of a functor*)
   type_dynamic_id :int; (*distinct for each application of a functor*)
   type_modname :string; (*name of the enclosing top-level (persistent) module*)
   type_manifest :rttype option;
The type of runtime representations of type declarations
type type_kind = 
| Type_primitive of primitive_type
| Type_abstract
| Type_variant of (string * rttype list) list
| Type_record of (string * rttype) list