Bindoj_typedesc.Typed_type_descThis module provides functionalities to handle typed types.
include module type of Type_descThis module provides functionalities to describe the types used in Bindoj.
type ('pos, 'kind) config = .. constraint 'pos = [< pos ]Configuration type where 'pos is restricted to pos types.
module Configs : sig ... endThis module provides the functionality of configurations. Contains types and functions for handling configurations.
val pp_configs : _ -> Kxclib.ppf -> _ configs -> unitdummy printer. always prints "<configs>".
module Coretype : sig ... endThis module provides functionalities to handle core types.
type coretype = Coretype.tval pp_coretype : Kxclib.ppf -> coretype -> unitPretty printer for the coretype.
val string_of_coretype : coretype -> stringtype record_field = {rf_name : string;Name of the record field
*)rf_type : [ `direct of coretype | `nested of type_decl * Coretype.codec ];Type of the record field
*)rf_configs : [ `record_field ] configs;Configurations associated with the record field
*)rf_doc : Bindoj_runtime.doc;Documentation of the record field
*)}Represents a record field.
and variant_tuple_argument = {va_type : [ `direct of coretype | `nested of type_decl * Coretype.codec ];va_configs : [ `variant_tuple_argument ] configs;va_doc : Bindoj_runtime.doc;}and variant_constructor = {vc_name : string;Name of the variant constructor
*)vc_param : [ `no_param
| `tuple_like of variant_tuple_argument list
| `inline_record of record_field list
| `reused_inline_record of type_decl ];vc_configs : [ `variant_constructor ] configs;Configurations associated with the variant constructor
*)vc_doc : Bindoj_runtime.doc;Documentation of the variant constructor
*)}Represents a variant constructor.
and type_decl_kind = | Alias_decl of coretypeType alias kind
*)| Record_decl of record_field listRecord type kind
*)| Variant_decl of variant_constructor listVariant type kind
*)Describe the kind of a type declaration.
and type_decl = {td_name : string;Name of the type declaration
*)td_configs : [ `type_decl ] configs;Configurations associated with the type declaration
*)td_kind : type_decl_kind;Kind of the type declaration
*)td_doc : Bindoj_runtime.doc;Documentation of the type declaration
*)}Represents a type declaration.
val pp_record_field : Kxclib.ppf -> record_field -> unitPretty printer for the record_field.
val string_of_record_field : record_field -> stringval equal_record_field : record_field -> record_field -> boolChecks equality of two record_fields.
val record_field :
?doc:Bindoj_runtime.doc ->
?configs:[ `record_field ] configs ->
string ->
coretype ->
record_fieldCreates a new record_field backed by a coretype.
val record_field_nested :
?doc:Bindoj_runtime.doc ->
?configs:[ `record_field ] configs ->
?codec:Coretype.codec ->
string ->
type_decl ->
record_fieldCreates a new record_field backed by another type_decl.
val variant_argument :
?doc:Bindoj_runtime.doc ->
?configs:[ `variant_tuple_argument ] configs ->
coretype ->
variant_tuple_argumentCreates a new argument type specification backed by a coretype for a position in a variant constructor that takes tuple-like arguments.
val variant_argument_nested :
?doc:Bindoj_runtime.doc ->
?configs:[ `variant_tuple_argument ] configs ->
?codec:Coretype.codec ->
type_decl ->
variant_tuple_argumentCreates a new argument type specification backed by a type_decl for a position in a variant constructor that takes tuple-like arguments.
val pp_variant_constructor : Kxclib.ppf -> variant_constructor -> unitPretty printer for the variant_constructor.
val string_of_variant_constructor : variant_constructor -> stringval equal_variant_constructor :
variant_constructor ->
variant_constructor ->
boolChecks equality of two variant_constructors.
val variant_constructor :
?doc:Bindoj_runtime.doc ->
?configs:[ `variant_constructor ] configs ->
string ->
[ `no_param
| `tuple_like of variant_tuple_argument list
| `inline_record of record_field list
| `reused_inline_record of type_decl ] ->
variant_constructorCreates a new variant_constructor
val pp_type_decl : Kxclib.ppf -> type_decl -> unitPretty printer for the type_decl.
val string_of_type_decl : type_decl -> stringtype config += | Config_caml_variant_type : variant_type -> ([ `type_decl ],
[ `caml_variant_type ])
configConfiguration for the Caml variant type.
*)module Caml_config : sig ... endThis module provides functionalities to handle configs of OCaml.
val alias_decl :
?doc:Bindoj_runtime.doc ->
?configs:[ `type_decl ] configs ->
string ->
coretype ->
type_declCreates a new type_decl of type_decl_kind.Alias_decl.
val record_decl :
?doc:Bindoj_runtime.doc ->
?configs:[ `type_decl ] configs ->
string ->
record_field list ->
type_declCreates a new type_decl of type_decl_kind.Record_decl.
val variant_decl :
?variant_type:variant_type ->
?doc:Bindoj_runtime.doc ->
?configs:[ `type_decl ] configs ->
string ->
variant_constructor list ->
type_declCreates a new type_decl of type_decl_kind.Variant_decl.
type ancestral_configs =
[ `alias of [ `type_decl ] configs
| `record_field of [ `type_decl ] configs * [ `record_field ] configs
| `variant_field of
[ `type_decl ] configs
* [ `variant_constructor ] configs
* [ `record_field ] configs
| `variant_reused_field of
[ `type_decl ] configs
* [ `variant_constructor ] configs
* [ `type_decl ] configs
* [ `record_field ] configs
| `variant_argument of
int
* [ `type_decl ] configs
* [ `variant_constructor ] configs
* [ `variant_tuple_argument ] configs ]
listList of kind and configs of type_decl, the parent of the coretype. The format of the list is path, with head being the closest.
val fold_coretypes' :
('a -> (coretype * ancestral_configs) -> 'a) ->
'a ->
type_decl ->
'atype 'a typed_type_decl =
(type_decl, 'a) Bindoj_runtime.generic_typed_type_declRepresents a typed type declaration that is parameterized by 'a.
Represents a boxed type declaration.
val of_generic_boxed :
type_decl Bindoj_runtime.boxed_generic_typed_type_decl ->
boxed_type_declmodule Typed : sig ... endThis module provides functionalities to handle typed_type_decl.
module Type_decl_environment : sig ... endtype tdenv = Type_decl_environment.env