package erlang

  1. Overview
  2. Docs

Module Core.AstSource

Sourcetype atom = string
Sourceval atom_of_sexp : Sexplib0.Sexp.t -> atom
Sourceval sexp_of_atom : atom -> Sexplib0.Sexp.t
Sourcetype var_name = string
Sourceval var_name_of_sexp : Sexplib0.Sexp.t -> var_name
Sourceval sexp_of_var_name : var_name -> Sexplib0.Sexp.t
Sourcetype 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
Sourceand 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
Sourceand let_binding = {
  1. lb_lhs : pattern;
  2. lb_expr : expr;
  3. lb_rhs : expr;
}
Sourceand letrec_binding = {
  1. lrb_lhs : (pattern * expr) list;
  2. lrb_rhs : expr;
}
Sourceand clause = {
  1. cp_lhs : pattern;
  2. cp_guard : expr option;
  3. cp_rhs : expr;
}
Sourceand case_expr = {
  1. case_exp : expr;
  2. case_pat : clause list;
}
Sourceand fun_expr = {
  1. fe_vars : var_name list;
  2. fe_arity : int;
  3. fe_body : expr;
}
Sourceand receive_expr = {
  1. rcv_pat : clause list;
  2. tm_after : expr;
  3. tm_body : expr;
}
Sourceand 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;
}
Sourceand 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
Sourceval literal_of_sexp : Sexplib0.Sexp.t -> literal
Sourceval pattern_of_sexp : Sexplib0.Sexp.t -> pattern
Sourceval let_binding_of_sexp : Sexplib0.Sexp.t -> let_binding
Sourceval letrec_binding_of_sexp : Sexplib0.Sexp.t -> letrec_binding
Sourceval clause_of_sexp : Sexplib0.Sexp.t -> clause
Sourceval case_expr_of_sexp : Sexplib0.Sexp.t -> case_expr
Sourceval fun_expr_of_sexp : Sexplib0.Sexp.t -> fun_expr
Sourceval receive_expr_of_sexp : Sexplib0.Sexp.t -> receive_expr
Sourceval try_catch_expr_of_sexp : Sexplib0.Sexp.t -> try_catch_expr
Sourceval expr_of_sexp : Sexplib0.Sexp.t -> expr
Sourceval sexp_of_literal : literal -> Sexplib0.Sexp.t
Sourceval sexp_of_pattern : pattern -> Sexplib0.Sexp.t
Sourceval sexp_of_let_binding : let_binding -> Sexplib0.Sexp.t
Sourceval sexp_of_letrec_binding : letrec_binding -> Sexplib0.Sexp.t
Sourceval sexp_of_clause : clause -> Sexplib0.Sexp.t
Sourceval sexp_of_case_expr : case_expr -> Sexplib0.Sexp.t
Sourceval sexp_of_fun_expr : fun_expr -> Sexplib0.Sexp.t
Sourceval sexp_of_receive_expr : receive_expr -> Sexplib0.Sexp.t
Sourceval sexp_of_try_catch_expr : try_catch_expr -> Sexplib0.Sexp.t
Sourceval sexp_of_expr : expr -> Sexplib0.Sexp.t
Sourcetype fname = {
  1. fn_name : atom;
  2. fn_arity : int;
}
Sourceval fname_of_sexp : Sexplib0.Sexp.t -> fname
Sourceval sexp_of_fname : fname -> Sexplib0.Sexp.t
Sourcetype fun_def = {
  1. fd_name : fname;
  2. fd_body : fun_expr;
}
Sourceval fun_def_of_sexp : Sexplib0.Sexp.t -> fun_def
Sourceval sexp_of_fun_def : fun_def -> Sexplib0.Sexp.t
Sourcetype attribute = {
  1. atr_name : atom;
  2. atr_value : literal;
}
Sourceval attribute_of_sexp : Sexplib0.Sexp.t -> attribute
Sourceval sexp_of_attribute : attribute -> Sexplib0.Sexp.t
Sourcetype 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;
}
Sourceval t_of_sexp : Sexplib0.Sexp.t -> t
Sourceval sexp_of_t : t -> Sexplib0.Sexp.t
OCaml

Innovation. Community. Security.