Module Concrete.Pattern

See TaglessFinal.Pattern.

type t = private
| MatchValue of {
location : Location.t;
value : Expression.t;
}
| MatchSingleton of {
location : Location.t;
value : Constant.t;
}
| MatchSequence of {
location : Location.t;
patterns : t list;
}
| MatchMapping of {
location : Location.t;
keys : Expression.t list;
patterns : t list;
rest : Identifier.t option;
}
| MatchClass of {
location : Location.t;
cls : Expression.t;
patterns : t list;
kwd_attrs : Identifier.t list;
kwd_patterns : t list;
}
| MatchStar of {
location : Location.t;
name : Identifier.t option;
}
| MatchAs of {
location : Location.t;
pattern : t option;
name : Identifier.t option;
}
| MatchOr of {
location : Location.t;
patterns : t list;
}
include Sexplib0.Sexpable.S with type t := t
val t_of_sexp : Sexplib0__.Sexp.t -> t
val sexp_of_t : t -> Sexplib0__.Sexp.t
include Ppx_compare_lib.Comparable.S with type t := t
val compare : t Base__Ppx_compare_lib.compare
include Ppx_hash_lib.Hashable.S with type t := t
val hash_fold_t : t Base__Ppx_hash_lib.hash_fold
val hash : t -> Base__Ppx_hash_lib.Std.Hash.hash_value
val make_matchvalue_of_t : location:Location.t -> value:Expression.t -> unit -> t
val make_matchsingleton_of_t : location:Location.t -> value:Constant.t -> unit -> t
val make_matchsequence_of_t : location:Location.t -> ?patterns:t list -> unit -> t
val make_matchmapping_of_t : location:Location.t -> ?keys:Expression.t list -> ?patterns:t list -> ?rest:Identifier.t -> unit -> t
val make_matchclass_of_t : location:Location.t -> cls:Expression.t -> ?patterns:t list -> ?kwd_attrs:Identifier.t list -> ?kwd_patterns:t list -> unit -> t
val make_matchstar_of_t : location:Location.t -> ?name:Identifier.t -> unit -> t
val make_matchas_of_t : location:Location.t -> ?pattern:t -> ?name:Identifier.t -> unit -> t
val make_matchor_of_t : location:Location.t -> ?patterns:t list -> unit -> t