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
val show_scope : scope -> Ppx_deriving_runtime.string
type var = Var.var
val pp_var : Ppx_deriving_runtime.Format.formatter -> var -> Ppx_deriving_runtime.unit
val show_var : var -> Ppx_deriving_runtime.string
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
type tyvar = Types.quantifier
val pp_tyvar : Ppx_deriving_runtime.Format.formatter -> tyvar -> Ppx_deriving_runtime.unit
val show_tyvar : tyvar -> Ppx_deriving_runtime.string
type tyarg = Types.type_arg
val pp_tyarg : Ppx_deriving_runtime.Format.formatter -> tyarg -> Ppx_deriving_runtime.unit
val show_tyarg : tyarg -> Ppx_deriving_runtime.string
type name = string
val pp_name : Ppx_deriving_runtime.Format.formatter -> name -> Ppx_deriving_runtime.unit
val show_name : name -> Ppx_deriving_runtime.string
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 name * value
  5. | Erase of name_set * value
  6. | Inject of name * value * Types.datatype
  7. | TAbs of tyvar list * value
  8. | TApp of value * tyarg list
  9. | XmlNode of name * value name_map * value list
  10. | ApplyPure of value * value list
  11. | Closure of var * tyarg list * value
  12. | Coerce of value * Types.datatype
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 = binder * (tyvar list * binder list * computation) * binder option * location
and binding =
  1. | Let of binder * tyvar list * tail_computation
  2. | Fun of fun_def
  3. | Rec of fun_def list
  4. | Alien of binder * name * language
  5. | Module of string * binding list option
and special =
  1. | Wrong of Types.datatype
  2. | Database of value
  3. | Lens of value * Links_core.Lens.Type.t
  4. | LensDrop of {
    1. lens : value;
    2. drop : string;
    3. key : string;
    4. default : value;
    5. typ : Links_core.Lens.Type.t;
    }
  5. | LensSelect of {
    1. lens : value;
    2. predicate : lens_predicate;
    3. typ : Links_core.Lens.Type.t;
    }
  6. | LensJoin of {
    1. left : value;
    2. right : value;
    3. on : string list;
    4. del_left : Links_core.Lens.Phrase.t;
    5. del_right : Links_core.Lens.Phrase.t;
    6. typ : Links_core.Lens.Type.t;
    }
  7. | LensCheck of value * Links_core.Lens.Type.t
  8. | LensGet of value * Types.datatype
  9. | LensPut of value * value * Types.datatype
  10. | Table of value * value * value * Types.datatype * Types.datatype * Types.datatype
  11. | Query of (value * value) option * computation * Types.datatype
  12. | InsertRows of value * value
  13. | InsertReturning of value * value * value
  14. | Update of binder * value * computation option * computation
  15. | Delete of binder * value * computation option
  16. | CallCC of value
  17. | Select of name * value
  18. | Choice of value * (binder * computation) name_map
  19. | Handle of handler
  20. | DoOperation of name * value list * Types.datatype
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 Links_core.Lens.Phrase.t
  2. | Dynamic of value
val pp_value : Ppx_deriving_runtime.Format.formatter -> value -> Ppx_deriving_runtime.unit
val show_value : value -> Ppx_deriving_runtime.string
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_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 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
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.