links

The Links Programming Language
IN THIS PACKAGE
Module Links_core . Ir

Monadic IR

type scope = Var.Scope.t
type var = Var.var
val equal_var : var -> var -> Ppx_deriving_runtime.bool
val var_to_yojson : var -> Yojson.Safe.t
type var_info = Var.var_info
val show_var_info : var_info -> Ppx_deriving_runtime.string
type binder = Var.binder
val show_binder : binder -> Ppx_deriving_runtime.string
type tyarg = Types.type_arg
type name_set = Utility.stringset
val show_name_set : name_set -> Ppx_deriving_runtime.string
type 'a name_map = 'a Utility.stringmap
type 'a var_map = 'a Utility.intmap
type language = string
val show_language : language -> Ppx_deriving_runtime.string
type location = CommonTypes.Location.t
val show_location : location -> Ppx_deriving_runtime.string
type value =
| Constant of CommonTypes.Constant.t
| Variable of var
| Extend of value name_map * value option
| Project of CommonTypes.Name.t * value
| Erase of name_set * value
| Inject of CommonTypes.Name.t * value * Types.t
| TAbs of tyvar list * value
| TApp of value * tyarg list
| XmlNode of CommonTypes.Name.t * value name_map * value list
| ApplyPure of value * value list
| Closure of var * tyarg list * value
| Coerce of value * Types.t
and tail_computation =
| Return of value
| Apply of value * value list
| Special of special
| Case of value * (binder * computation) name_map * (binder * computation) option
| If of value * computation * computation
and fun_def = {
fn_binder : binder;
fn_tyvars : tyvar list;
fn_params : binder list;
fn_body : computation;
fn_closure : binder option;
fn_location : location;
fn_unsafe : bool;
}
and temporal_update =
| ValidTimeUpdate of valid_time_update
| TransactionTimeUpdate
and valid_time_update =
| CurrentUpdate
| SequencedUpdate of {
validity_from : value;
validity_to : value;
}
| NonsequencedUpdate of {
from_time : computation option;
to_time : computation option;
}
and temporal_deletion =
| ValidTimeDeletion of valid_time_deletion
| TransactionTimeDeletion
and valid_time_deletion =
| CurrentDeletion
| SequencedDeletion of {
validity_from : value;
validity_to : value;
}
| NonsequencedDeletion
and valid_time_insertion =
| CurrentInsertion
| SequencedInsertion
and temporal_insertion =
| ValidTimeInsertion of valid_time_insertion
| TransactionTimeInsertion
and binding =
| Let of binder * tyvar list * tail_computation
| Fun of fun_def
| Rec of fun_def list
| Alien of {
binder : binder;
language : CommonTypes.ForeignLanguage.t;
object_name : string;
}
| Module of string * binding list option
and special =
| Wrong of Types.t
| Database of value
| Lens of value * Lens.Type.t
| LensSerial of {
lens : value;
columns : Lens.Alias.Set.t;
typ : Lens.Type.t;
}
| LensDrop of {
lens : value;
drop : string;
key : string;
default : value;
typ : Lens.Type.t;
}
| LensSelect of {
lens : value;
predicate : lens_predicate;
typ : Lens.Type.t;
}
| LensJoin of {
left : value;
right : value;
on : string list;
del_left : Lens.Phrase.t;
del_right : Lens.Phrase.t;
typ : Lens.Type.t;
}
| LensCheck of value * Lens.Type.t
| LensGet of value * Types.t
| LensPut of value * value * Types.t
| Table of table
| Query of (value * value) option * CommonTypes.QueryPolicy.t * computation * Types.t
| TemporalJoin of CommonTypes.Temporality.t * computation * Types.datatype
| InsertRows of temporal_insertion option * value * value
| InsertReturning of temporal_insertion option * value * value * value
| Update of temporal_update option * binder * value * computation option * computation
| Delete of temporal_deletion option * binder * value * computation option
| CallCC of value
| Select of CommonTypes.Name.t * value
| Choice of value * (binder * computation) name_map
| Handle of handler
| DoOperation of CommonTypes.Name.t * value list * Types.t
and computation = binding list * tail_computation
and effect_case = binder * binder * computation
and handler = {
ih_comp : computation;
ih_cases : effect_case name_map;
ih_return : binder * computation;
ih_depth : handler_depth;
}
and handler_depth =
| Deep of (binder * value) list
| Shallow
and lens_predicate =
| Static of Lens.Phrase.t
| Dynamic of value
and table = {
database : value;
table : value;
keys : value;
temporal_fields : (string * string) option;
table_type : CommonTypes.Temporality.t * Types.datatype * Types.datatype * Types.datatype;
}
val show_tail_computation : tail_computation -> Ppx_deriving_runtime.string
val show_fun_def : fun_def -> Ppx_deriving_runtime.string
val show_temporal_update : temporal_update -> Ppx_deriving_runtime.string
val show_valid_time_update : valid_time_update -> Ppx_deriving_runtime.string
val show_temporal_deletion : temporal_deletion -> Ppx_deriving_runtime.string
val show_valid_time_deletion : valid_time_deletion -> Ppx_deriving_runtime.string
val show_valid_time_insertion : valid_time_insertion -> Ppx_deriving_runtime.string
val show_temporal_insertion : temporal_insertion -> Ppx_deriving_runtime.string
val show_binding : binding -> Ppx_deriving_runtime.string
val show_special : special -> Ppx_deriving_runtime.string
val show_computation : computation -> Ppx_deriving_runtime.string
val show_effect_case : effect_case -> Ppx_deriving_runtime.string
val show_handler : handler -> Ppx_deriving_runtime.string
val show_handler_depth : handler_depth -> Ppx_deriving_runtime.string
val show_lens_predicate : lens_predicate -> Ppx_deriving_runtime.string
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 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 show_eval_fun_def : eval_fun_def -> Ppx_deriving_runtime.string