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 : Pattern.t list;
}
| MatchStar of {
location : Location.t;
name : Identifier.t option;
}
| MatchAs of {
location : Location.t;
pattern : Pattern.t option;
name : Identifier.t option;
}
| MatchOr of {
location : Location.t;
patterns : Pattern.t list;
}
include Ppx_sexp_conv_lib.Sexpable.S with type Pattern.t := t
val t_of_sexp : Sexplib0__.Sexp.t -> t
val sexp_of_t : t -> Sexplib0__.Sexp.t
val compare : t -> t -> int
val hash_fold_t : Ppx_hash_lib.Std.Hash.state -> t -> Ppx_hash_lib.Std.Hash.state
val hash : t -> 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:Pattern.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:Pattern.t -> ?⁠name:Identifier.t -> unit -> t
val make_matchor_of_t : location:Location.t -> ?⁠patterns:Pattern.t list -> unit -> t