Legend:
Library
Module
Module type
Parameter
Class
Class type
Library
Module
Module type
Parameter
Class
Class type
Error type
type 'a result_ = [
| `NoMatch
The pattern does not match the name
*)| `Matched of (Pattern.path * 'a) list
The pattern matches the name, with a list of tagged new names after renaming
*) ]
The result type of pattern matching
val run :
default:'a ->
join:('a -> 'a -> 'a) ->
meet:('a -> 'a -> 'a) ->
'a Pattern.pattern ->
Pattern.path ->
('a result_, 'a error) result
The pattern matching engine.
val run_ :
unit Pattern.pattern ->
Pattern.path ->
(unit result_, unit error) result
The engine specialized to the unit
type as the attribute type
val check : 'a Pattern.pattern -> (unit, 'a error) result
Check whether the pattern would lead to errors if run.
val pp_result_ :
(Format.formatter -> 'a -> unit) ->
Format.formatter ->
'a result_ ->
unit
Pretty-printer for result_
.
val pp_result :
(Format.formatter -> 'a -> unit) ->
Format.formatter ->
('a result_, 'a error) result ->
unit
Pretty-printer for results of pattern matching.
val pp_check_result :
(Format.formatter -> 'a -> unit) ->
Format.formatter ->
(unit, 'a error) result ->
unit
Pretty-printer for results checking patterns.