Pattern.Make_with_hash_consing
module X : Algebraic_signature.S
module Micheline :
Micheline_sig.S
with type head = X.t
and type label = Micheline_with_hash_consing.hcons_info
include S
with type head = X.t
and type path = Path.t
and type node = Micheline.node
type head = X.t
The type of primitives.
type path = Path.t
The type of paths.
type node = Micheline.node
Micheline nodes.
focus_matches patt matches
converts a list of matches for a contextual pattern patt
into the list of matches for the focused sub-pattern. Returns the empty list if there is no focused subpattern.
val int : (Z.t -> bool) option -> t
Matches an integer, with an optional predicate.
val string : (string -> bool) option -> t
Matches a string, with an optional predicate.
val bytes : (Stdlib.Bytes.t -> bool) option -> t
Matches a bytes, with an optional predicate.
prim hd subpatts
constructs a pattern matching a primitive application with primitive equal to head and the specified subterms pattern subpatts
.
More general version of prim
where an arbitrary predicate on primitives can be used.
val any : t
Matches anything.
Flags a pattern as being a focus of the pattern. There can be several foci per pattern but they cannot be nested (an error is raised in this case).
val list_any : plist
Matches any list of patterns.
val list_empty : plist
Matches the empty list of pattern.
val pp : Stdlib.Format.formatter -> t -> unit
Pretty-printing.
val uid : t -> int
Returns a unique id for patterns. Two patterns with the same uid are physically equal, but not necessarily the other way around (except in hash-consing mode).