package links

  1. Overview
  2. Docs

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 =
  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 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 value * value * value * Types.t * Types.t * Types.t
  12. | Query of (value * value) option * CommonTypes.QueryPolicy.t * computation * Types.t
  13. | InsertRows of value * value
  14. | InsertReturning of value * value * value
  15. | Update of binder * value * computation option * computation
  16. | Delete of binder * value * computation option
  17. | CallCC of value
  18. | Select of CommonTypes.Name.t * value
  19. | Choice of value * (binder * computation) name_map
  20. | Handle of handler
  21. | 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
val show_tail_computation : tail_computation -> Ppx_deriving_runtime.string
val show_fun_def : fun_def -> 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
OCaml

Innovation. Community. Security.