Module Type_desc.Configs

This module provides the functionality of configurations. Contains types and functions for handling configurations.

type 'pos t =
  1. | [] : 'pos t
  2. | :: : (('pos, 'a) config * 'pos t) -> 'pos t
val empty : 'pos t

An empty configuration.

val find : (('pos, 'kind) config -> 'a option) -> 'pos t -> 'a option

Returns the result of the appropriate conversion if found, else None.

val find_or_default : default:'a -> (('pos, 'kind) config -> 'a option) -> 'pos t -> 'a

Returns the result of the appropriate conversion if found, else the default value.

val get : ?default:('pos, 'kind) config -> (('pos, 'kind) config -> bool) -> 'pos t -> ('pos, 'kind) config

Returns the first configuration satisfying the predicate if found, else the default configuration.

type config +=
  1. | Config_foreign_type_expression : ('tag, 'datatype_expr) Bindoj_runtime.foreign_language * 'datatype_expr -> ([ `coretype ], [ `foreign_type_expression ]) config
    (*

    Config for foreign type expression.

    *)
val find_foreign_type_expr : ('tag, 'datatype_expr) Bindoj_runtime.foreign_language -> [ `coretype ] t -> 'datatype_expr option

Returns the datatype_expr of the configuration involving the given foreign language if found, else None.