package links

  1. Overview
  2. Docs

Monadic IR

type scope = Var.Scope.t
val pp_scope : Ppx_deriving_runtime.Format.formatter -> scope -> Ppx_deriving_runtime.unit
type var = Var.var
val pp_var : Ppx_deriving_runtime.Format.formatter -> var -> Ppx_deriving_runtime.unit
val equal_var : var -> var -> Ppx_deriving_runtime.bool
val var_to_yojson : var -> Yojson.Safe.t
val var_of_yojson : Yojson.Safe.t -> var Ppx_deriving_yojson_runtime.error_or
type var_info = Var.var_info
val pp_var_info : Ppx_deriving_runtime.Format.formatter -> var_info -> Ppx_deriving_runtime.unit
val show_var_info : var_info -> Ppx_deriving_runtime.string
type binder = Var.binder
val pp_binder : Ppx_deriving_runtime.Format.formatter -> binder -> Ppx_deriving_runtime.unit
val show_binder : binder -> Ppx_deriving_runtime.string
val pp_tyvar : Ppx_deriving_runtime.Format.formatter -> tyvar -> Ppx_deriving_runtime.unit
type tyarg = Types.type_arg
val pp_tyarg : Ppx_deriving_runtime.Format.formatter -> tyarg -> Ppx_deriving_runtime.unit
type name_set = Utility.stringset
val pp_name_set : Ppx_deriving_runtime.Format.formatter -> name_set -> Ppx_deriving_runtime.unit
val show_name_set : name_set -> Ppx_deriving_runtime.string
type 'a name_map = 'a Utility.stringmap
val pp_name_map : (Ppx_deriving_runtime.Format.formatter -> 'a -> Ppx_deriving_runtime.unit) -> Ppx_deriving_runtime.Format.formatter -> 'a name_map -> Ppx_deriving_runtime.unit
val show_name_map : (Ppx_deriving_runtime.Format.formatter -> 'a -> Ppx_deriving_runtime.unit) -> 'a name_map -> Ppx_deriving_runtime.string
type 'a var_map = 'a Utility.intmap
val pp_var_map : (Ppx_deriving_runtime.Format.formatter -> 'a -> Ppx_deriving_runtime.unit) -> Ppx_deriving_runtime.Format.formatter -> 'a var_map -> Ppx_deriving_runtime.unit
val show_var_map : (Ppx_deriving_runtime.Format.formatter -> 'a -> Ppx_deriving_runtime.unit) -> 'a var_map -> Ppx_deriving_runtime.string
type language = string
val pp_language : Ppx_deriving_runtime.Format.formatter -> language -> Ppx_deriving_runtime.unit
val show_language : language -> Ppx_deriving_runtime.string
type location = CommonTypes.Location.t
val pp_location : Ppx_deriving_runtime.Format.formatter -> location -> Ppx_deriving_runtime.unit
val show_location : location -> Ppx_deriving_runtime.string
type value =
  1. | Constant of CommonTypes.Constant.t
  2. | Variable of var
  3. | Extend of value name_map * value option
  4. | Project of CommonTypes.Name.t * value
  5. | Erase of name_set * value
  6. | Inject of CommonTypes.Name.t * value * Types.t
  7. | TAbs of tyvar list * value
  8. | TApp of value * tyarg list
  9. | XmlNode of CommonTypes.Name.t * value name_map * value list
  10. | ApplyPure of value * value list
  11. | Closure of var * tyarg list * value
  12. | Coerce of value * Types.t
and tail_computation =
  1. | Return of value
  2. | Apply of value * value list
  3. | Special of special
  4. | Case of value * (binder * computation) name_map * (binder * computation) option
  5. | If of value * computation * computation
and fun_def = {
  1. fn_binder : binder;
  2. fn_tyvars : tyvar list;
  3. fn_params : binder list;
  4. fn_body : computation;
  5. fn_closure : binder option;
  6. fn_location : location;
  7. fn_unsafe : bool;
}
and temporal_update =
  1. | ValidTimeUpdate of valid_time_update
  2. | TransactionTimeUpdate
and valid_time_update =
  1. | CurrentUpdate
  2. | SequencedUpdate of {
    1. validity_from : value;
    2. validity_to : value;
    }
  3. | NonsequencedUpdate of {
    1. from_time : computation option;
    2. to_time : computation option;
    }
and temporal_deletion =
  1. | ValidTimeDeletion of valid_time_deletion
  2. | TransactionTimeDeletion
and valid_time_deletion =
  1. | CurrentDeletion
  2. | SequencedDeletion of {
    1. validity_from : value;
    2. validity_to : value;
    }
  3. | NonsequencedDeletion
and valid_time_insertion =
  1. | CurrentInsertion
  2. | SequencedInsertion
and temporal_insertion =
  1. | ValidTimeInsertion of valid_time_insertion
  2. | TransactionTimeInsertion
and binding =
  1. | Let of binder * tyvar list * tail_computation
  2. | Fun of fun_def
  3. | Rec of fun_def list
  4. | Alien of {
    1. binder : binder;
    2. language : CommonTypes.ForeignLanguage.t;
    3. object_name : string;
    }
  5. | Module of string * binding list option
and special =
  1. | Wrong of Types.t
  2. | Database of value
  3. | Lens of value * Links_core.Lens.Type.t
  4. | LensSerial of {
    1. lens : value;
    2. columns : Links_core.Lens.Alias.Set.t;
    3. typ : Links_core.Lens.Type.t;
    }
  5. | LensDrop of {
    1. lens : value;
    2. drop : string;
    3. key : string;
    4. default : value;
    5. typ : Links_core.Lens.Type.t;
    }
  6. | LensSelect of {
    1. lens : value;
    2. predicate : lens_predicate;
    3. typ : Links_core.Lens.Type.t;
    }
  7. | LensJoin of {
    1. left : value;
    2. right : value;
    3. on : string list;
    4. del_left : Lens.Phrase.t;
    5. del_right : Lens.Phrase.t;
    6. typ : Links_core.Lens.Type.t;
    }
  8. | LensCheck of value * Links_core.Lens.Type.t
  9. | LensGet of value * Types.t
  10. | LensPut of value * value * Types.t
  11. | Table of table
  12. | Query of (value * value) option * CommonTypes.QueryPolicy.t * computation * Types.t
  13. | TemporalJoin of CommonTypes.Temporality.t * computation * Types.datatype
  14. | InsertRows of temporal_insertion option * value * value
  15. | InsertReturning of temporal_insertion option * value * value * value
  16. | Update of temporal_update option * binder * value * computation option * computation
  17. | Delete of temporal_deletion option * binder * value * computation option
  18. | CallCC of value
  19. | Select of CommonTypes.Name.t * value
  20. | Choice of value * (binder * computation) name_map
  21. | Handle of handler
  22. | DoOperation of CommonTypes.Name.t * value list * Types.t
and computation = binding list * tail_computation
and effect_case = binder * binder * computation
and handler = {
  1. ih_comp : computation;
  2. ih_cases : effect_case name_map;
  3. ih_return : binder * computation;
  4. ih_depth : handler_depth;
}
and handler_depth =
  1. | Deep of (binder * value) list
  2. | Shallow
and lens_predicate =
  1. | Static of Lens.Phrase.t
  2. | Dynamic of value
and table = {
  1. database : value;
  2. table : value;
  3. keys : value;
  4. temporal_fields : (string * string) option;
  5. table_type : CommonTypes.Temporality.t * Types.datatype * Types.datatype * Types.datatype;
}
val pp_value : Ppx_deriving_runtime.Format.formatter -> value -> Ppx_deriving_runtime.unit
val pp_tail_computation : Ppx_deriving_runtime.Format.formatter -> tail_computation -> Ppx_deriving_runtime.unit
val show_tail_computation : tail_computation -> Ppx_deriving_runtime.string
val pp_fun_def : Ppx_deriving_runtime.Format.formatter -> fun_def -> Ppx_deriving_runtime.unit
val show_fun_def : fun_def -> Ppx_deriving_runtime.string
val pp_temporal_update : Ppx_deriving_runtime.Format.formatter -> temporal_update -> Ppx_deriving_runtime.unit
val show_temporal_update : temporal_update -> Ppx_deriving_runtime.string
val pp_valid_time_update : Ppx_deriving_runtime.Format.formatter -> valid_time_update -> Ppx_deriving_runtime.unit
val show_valid_time_update : valid_time_update -> Ppx_deriving_runtime.string
val pp_temporal_deletion : Ppx_deriving_runtime.Format.formatter -> temporal_deletion -> Ppx_deriving_runtime.unit
val show_temporal_deletion : temporal_deletion -> Ppx_deriving_runtime.string
val pp_valid_time_deletion : Ppx_deriving_runtime.Format.formatter -> valid_time_deletion -> Ppx_deriving_runtime.unit
val show_valid_time_deletion : valid_time_deletion -> Ppx_deriving_runtime.string
val pp_valid_time_insertion : Ppx_deriving_runtime.Format.formatter -> valid_time_insertion -> Ppx_deriving_runtime.unit
val show_valid_time_insertion : valid_time_insertion -> Ppx_deriving_runtime.string
val pp_temporal_insertion : Ppx_deriving_runtime.Format.formatter -> temporal_insertion -> Ppx_deriving_runtime.unit
val show_temporal_insertion : temporal_insertion -> Ppx_deriving_runtime.string
val pp_binding : Ppx_deriving_runtime.Format.formatter -> binding -> Ppx_deriving_runtime.unit
val show_binding : binding -> Ppx_deriving_runtime.string
val pp_special : Ppx_deriving_runtime.Format.formatter -> special -> Ppx_deriving_runtime.unit
val show_special : special -> Ppx_deriving_runtime.string
val pp_computation : Ppx_deriving_runtime.Format.formatter -> computation -> Ppx_deriving_runtime.unit
val show_computation : computation -> Ppx_deriving_runtime.string
val pp_effect_case : Ppx_deriving_runtime.Format.formatter -> effect_case -> Ppx_deriving_runtime.unit
val show_effect_case : effect_case -> Ppx_deriving_runtime.string
val pp_handler : Ppx_deriving_runtime.Format.formatter -> handler -> Ppx_deriving_runtime.unit
val show_handler : handler -> Ppx_deriving_runtime.string
val pp_handler_depth : Ppx_deriving_runtime.Format.formatter -> handler_depth -> Ppx_deriving_runtime.unit
val show_handler_depth : handler_depth -> Ppx_deriving_runtime.string
val pp_lens_predicate : Ppx_deriving_runtime.Format.formatter -> lens_predicate -> Ppx_deriving_runtime.unit
val show_lens_predicate : lens_predicate -> Ppx_deriving_runtime.string
val pp_table : Ppx_deriving_runtime.Format.formatter -> table -> Ppx_deriving_runtime.unit
val binding_scope : binding -> scope
val binder_of_fun_def : fun_def -> binder
val tapp : (value * tyarg list) -> value
val letm : ?tyvars:tyvar list -> (binder * tail_computation) -> binding
val letmv : (binder * value) -> binding
val unit : value
val unit_comp : computation
type program = computation
val pp_program : Ppx_deriving_runtime.Format.formatter -> program -> Ppx_deriving_runtime.unit
val show_program : program -> Ppx_deriving_runtime.string
val is_atom : value -> bool
val with_bindings : binding list -> computation -> computation
val string_of_var : var -> string
val string_of_value : value -> string
val string_of_tail_computation : tail_computation -> string
val string_of_binding : binding -> string
val string_of_special : special -> string
val string_of_computation : computation -> string
val string_of_program : program -> string
type eval_fun_def = var_info * (var list * computation) * Var.var option * location
val pp_eval_fun_def : Ppx_deriving_runtime.Format.formatter -> eval_fun_def -> Ppx_deriving_runtime.unit
val show_eval_fun_def : eval_fun_def -> Ppx_deriving_runtime.string
OCaml

Innovation. Community. Security.