package erlang

  1. Overview
  2. Docs
type atom = string
val atom_of_sexp : Sexplib0.Sexp.t -> atom
val sexp_of_atom : atom -> Sexplib0.Sexp.t
type var_name = string
val var_name_of_sexp : Sexplib0.Sexp.t -> var_name
val sexp_of_var_name : var_name -> Sexplib0.Sexp.t
type literal =
  1. | Lit_integer of int
  2. | Lit_float of float
  3. | Lit_char of char
  4. | Lit_string of string
  5. | Lit_atom of atom
  6. | Lit_nil
  7. | Lit_cons of literal * literal
  8. | Lit_tuple of literal list
and pattern =
  1. | Pat_var_name of var_name
  2. | Pat_tuple of pattern list
  3. | Pat_list of pattern list
  4. | Pat_bitstring of pattern list
and let_binding = {
  1. lb_lhs : pattern;
  2. lb_expr : expr;
  3. lb_rhs : expr;
}
and letrec_binding = {
  1. lrb_lhs : (pattern * expr) list;
  2. lrb_rhs : expr;
}
and clause = {
  1. cp_lhs : pattern;
  2. cp_guard : expr option;
  3. cp_rhs : expr;
}
and case_expr = {
  1. case_exp : expr;
  2. case_pat : clause list;
}
and fun_expr = {
  1. fe_vars : var_name list;
  2. fe_arity : int;
  3. fe_body : expr;
}
and receive_expr = {
  1. rcv_pat : clause list;
  2. tm_after : expr;
  3. tm_body : expr;
}
and try_catch_expr = {
  1. tc_exp : expr;
  2. tc_vars : var_name list;
  3. tc_in : expr;
  4. tc_catch_vars : var_name list;
  5. tc_catch : expr;
}
and expr =
  1. | Expr_var of var_name
  2. | Expr_literal of literal
  3. | Expr_let of let_binding
  4. | Expr_letrec of letrec_binding
  5. | Expr_case of case_expr
  6. | Expr_apply of {
    1. fn_name : expr;
    2. fn_args : expr list;
    }
  7. | Expr_qualified_call of {
    1. qc_mod : expr;
    2. qc_fun : expr;
    3. qc_args : expr list;
    }
  8. | Expr_fun of fun_expr
  9. | Expr_receive of receive_expr
  10. | Expr_primop of {
    1. pop_name : atom;
    2. pop_args : expr list;
    }
  11. | Expr_try of try_catch_expr
  12. | Expr_do of expr list
  13. | Expr_catch of expr
val literal_of_sexp : Sexplib0__.Sexp.t -> literal
val pattern_of_sexp : Sexplib0__.Sexp.t -> pattern
val let_binding_of_sexp : Sexplib0.Sexp.t -> let_binding
val letrec_binding_of_sexp : Sexplib0.Sexp.t -> letrec_binding
val clause_of_sexp : Sexplib0__.Sexp.t -> clause
val case_expr_of_sexp : Sexplib0.Sexp.t -> case_expr
val fun_expr_of_sexp : Sexplib0.Sexp.t -> fun_expr
val receive_expr_of_sexp : Sexplib0.Sexp.t -> receive_expr
val try_catch_expr_of_sexp : Sexplib0.Sexp.t -> try_catch_expr
val expr_of_sexp : Sexplib0__.Sexp.t -> expr
val sexp_of_literal : literal -> Sexplib0__.Sexp.t
val sexp_of_pattern : pattern -> Sexplib0__.Sexp.t
val sexp_of_let_binding : let_binding -> Sexplib0.Sexp.t
val sexp_of_letrec_binding : letrec_binding -> Sexplib0.Sexp.t
val sexp_of_clause : clause -> Sexplib0__.Sexp.t
val sexp_of_case_expr : case_expr -> Sexplib0.Sexp.t
val sexp_of_fun_expr : fun_expr -> Sexplib0.Sexp.t
val sexp_of_receive_expr : receive_expr -> Sexplib0.Sexp.t
val sexp_of_try_catch_expr : try_catch_expr -> Sexplib0.Sexp.t
val sexp_of_expr : expr -> Sexplib0__.Sexp.t
type fname = {
  1. fn_name : atom;
  2. fn_arity : int;
}
val fname_of_sexp : Sexplib0.Sexp.t -> fname
val sexp_of_fname : fname -> Sexplib0.Sexp.t
type fun_def = {
  1. fd_name : fname;
  2. fd_body : fun_expr;
}
val fun_def_of_sexp : Sexplib0.Sexp.t -> fun_def
val sexp_of_fun_def : fun_def -> Sexplib0.Sexp.t
type attribute = {
  1. atr_name : atom;
  2. atr_value : literal;
}
val attribute_of_sexp : Sexplib0.Sexp.t -> attribute
val sexp_of_attribute : attribute -> Sexplib0.Sexp.t
type t = {
  1. m_filename : string;
  2. m_name : atom;
  3. m_fnames : fname list;
  4. m_attributes : attribute list;
  5. m_defs : fun_def list;
}
val t_of_sexp : Sexplib0.Sexp.t -> t
val sexp_of_t : t -> Sexplib0.Sexp.t
OCaml

Innovation. Community. Security.