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) Stdlib.result
The pattern matching engine.
val run_ :
unit Pattern.pattern ->
Pattern.path ->
(unit result_, unit error) Stdlib.result
The engine specialized to the unit
type as the attribute type
val check : 'a Pattern.pattern -> (unit, 'a error) Stdlib.result
Check whether the pattern would lead to errors if run.
val pp_result_ :
(Stdlib.Format.formatter -> 'a -> unit) ->
Stdlib.Format.formatter ->
'a result_ ->
unit
Pretty-printer for result_
.
val pp_result :
(Stdlib.Format.formatter -> 'a -> unit) ->
Stdlib.Format.formatter ->
('a result_, 'a error) Stdlib.result ->
unit
Pretty-printer for results of pattern matching.
val pp_check_result :
(Stdlib.Format.formatter -> 'a -> unit) ->
Stdlib.Format.formatter ->
(unit, 'a error) Stdlib.result ->
unit
Pretty-printer for results checking patterns.