Tast_patternSourceMatching combinators for Typedtree.
Inspired by Ppxlib.Ast_pattern module.
Matches a value against a pattern.
Pattern that captures its input with location.
Mapping results of applying pattern-combinator
val tpat_tuple :
(Typedtree.value Typedtree.general_pattern list, 'a, 'b) t ->
(Typedtree.value Typedtree.pattern_desc Typedtree.pattern_data, 'a, 'b) tval tpat_constructor :
(Longident.t, 'a, 'b) t ->
(Typedtree.pattern list, 'b, 'c) t ->
(Typedtree.pattern, 'a, 'c) tTrying to parse identifier with a given path. Beware that standard function are locted implicitly in Stdlib module. For example
texp_ident (path "&&" ) (* WRONG *) texp_ident (path "Stdlib"; "&&" ) (* CORRECT *)
val texp_ident_typ :
(Path.t, 'a, 'b) t ->
(Types.type_expr, 'b, 'c) t ->
(Typedtree.expression, 'a, 'c) tval texp_let :
(Typedtree.value_binding list, 'a, 'b) t ->
(Typedtree.expression, 'b, 'c) t ->
(Typedtree.expression, 'a, 'c) tval texp_apply :
(Typedtree.expression, 'a, 'b) t ->
((Asttypes.arg_label * apply_arg) list, 'b, 'c) t ->
(Typedtree.expression, 'a, 'c) tval texp_apply1 :
(Typedtree.expression, 'a, 'b) t ->
(Typedtree.expression, 'b, 'c) t ->
(Typedtree.expression, 'a, 'c) tval texp_apply2 :
(Typedtree.expression, 'a, 'b) t ->
(Typedtree.expression, 'b, 'c) t ->
(Typedtree.expression, 'c, 'd) t ->
(Typedtree.expression, 'a, 'd) tval texp_apply_nolabelled :
(Typedtree.expression, 'a, 'b) t ->
(Typedtree.expression list, 'b, 'c) t ->
(Typedtree.expression, 'a, 'c) tval texp_function_body :
((Asttypes.arg_label * (Ident.t * Location.t)) list, 'a, 'b) t ->
(Typedtree.expression, 'b, 'c) t ->
(Typedtree.expression, 'a, 'c) tval texp_function_cases :
((Asttypes.arg_label * (Ident.t * Location.t)) list, 'a, 'b) t ->
(Typedtree.value Typedtree.case list, 'b, 'c) t ->
(Typedtree.expression, 'a, 'c) tval case :
(Typedtree.pattern, 'a, 'b) t ->
(Typedtree.expression option, 'b, 'c) t ->
(Typedtree.expression, 'c, 'd) t ->
(case_val, 'a, 'd) tval ccase :
(comp_pat, 'a, 'b) t ->
(Typedtree.expression option, 'b, 'c) t ->
(Typedtree.expression, 'c, 'd) t ->
(case_comp, 'a, 'd) tval texp_construct :
(Longident.t, 'a, 'b) t ->
(constructor_description, 'b, 'c) t ->
(Typedtree.expression list, 'c, 'd) t ->
(Typedtree.expression, 'a, 'd) tval texp_match :
(Typedtree.expression, 'a, 'b) t ->
(case_comp list, 'b, 'c) t ->
(case_val list, 'c, 'd) t ->
(Typedtree.expression, 'a, 'd) tval texp_ite :
(Typedtree.expression, 'a, 'b) t ->
(Typedtree.expression, 'b, 'c) t ->
(Typedtree.expression option, 'c, 'd) t ->
(Typedtree.expression, 'a, 'd) tval texp_try :
(Typedtree.expression, 'a, 'b) t ->
(case_val list, 'b, 'c) t ->
(Typedtree.expression, 'a, 'c) tval texp_record :
(Typedtree.expression option, 'a, 'b) t ->
((label_description * Typedtree.record_label_definition) array, 'b, 'c) t ->
(Typedtree.expression, 'a, 'c) tval texp_field :
(Typedtree.expression, 'a, 'b) t ->
(label_description, 'b, 'c) t ->
(Typedtree.expression, 'a, 'c) tval rld_overriden :
(Longident.t, 'a, 'b) t ->
(Typedtree.expression, 'b, 'c) t ->
(Typedtree.record_label_definition, 'a, 'c) tval value_binding :
(Typedtree.pattern, 'a, 'b) t ->
(Typedtree.expression, 'b, 'c) t ->
(Typedtree.value_binding, 'a, 'c) tval typ_constr :
(Path.t, 'a, 'b) t ->
(Types.type_expr list, 'b, 'c) t ->
(Types.type_expr, 'a, 'c) tval typ_arrow :
(Types.type_expr, 'a, 'b) t ->
(Types.type_expr, 'b, 'c) t ->
(Types.type_expr, 'a, 'c) tval typ_kind_record :
(Typedtree.label_declaration list, 'b, 'c) t ->
(Typedtree.type_kind, 'b, 'c) tval attribute :
(string, 'a, 'b) t ->
(Parsetree.payload, 'b, 'c) t ->
(Typedtree.attribute, 'a, 'c) tval pexp_function_body :
(Parsetree.pattern list, 'a, 'b) t ->
(Parsetree.expression, 'b, 'c) t ->
(Parsetree.expression, 'a, 'c) tval pexp_function_cases :
(Parsetree.pattern list, 'a, 'b) t ->
(Parsetree.case list, 'b, 'c) t ->
(Parsetree.expression, 'a, 'c) tval pexp_apply :
(Parsetree.expression, 'a, 'b) t ->
((Asttypes.arg_label * Parsetree.expression) list, 'b, 'c) t ->
(Parsetree.expression, 'a, 'c) t