package coq-core
- Overview
- No Docs
You can search for identifiers within the package.
in-package search v0.2.0
Install
dune-project
Dependency
Authors
Maintainers
Sources
md5=64b49dbc3205477bd7517642c0b9cbb6
sha512=02fb5b4fb575af79e092492cbec6dc0d15a1d74a07f827f657a72d4e6066532630e5a6d15be4acdb73314bd40b9a321f9ea0584e0ccfe51fd3a56353bd30db9b
doc/coq-core.pretyping/Constr_matching/index.html
Module Constr_matchingSource
This module implements pattern-matching on terms
val instantiate_pattern :
Environ.env ->
Evd.evar_map ->
Ltac_pretype.extended_patvar_map ->
Pattern.constr_pattern ->
instantiated_patternPatternMatchingFailure is the exception raised when pattern matching fails
special_meta is the default name of the meta holding the surrounding context in subterm matching
bound_ident_map represents the result of matching binding identifiers of the pattern with the binding identifiers of the term matched
val matches :
Environ.env ->
Evd.evar_map ->
Pattern.constr_pattern ->
EConstr.constr ->
Ltac_pretype.patvar_mapmatches pat c matches c against pat and returns the resulting assignment of metavariables; it raises PatternMatchingFailure if not matchable; bindings are given in increasing order based on the numbers given in the pattern
val matches_head :
Environ.env ->
Evd.evar_map ->
Pattern.constr_pattern ->
EConstr.constr ->
Ltac_pretype.patvar_mapmatches_head pat c does the same as matches pat c but accepts pat to match an applicative prefix of c
val extended_matches :
Environ.env ->
Evd.evar_map ->
(binding_bound_vars * instantiated_pattern) ->
EConstr.constr ->
bound_ident_map * Ltac_pretype.extended_patvar_mapextended_matches pat c also returns the names of bound variables in c that matches the bound variables in pat; if several bound variables or metavariables have the same name, the metavariable, or else the rightmost bound variable, takes precedence
val is_matching :
Environ.env ->
Evd.evar_map ->
Pattern.constr_pattern ->
EConstr.constr ->
boolis_matching pat c just tells if c matches against pat
val is_matching_head :
Environ.env ->
Evd.evar_map ->
Pattern.constr_pattern ->
EConstr.constr ->
boolis_matching_head pat c just tells if c or an applicative prefix of it matches against pat
The type of subterm matching results: a substitution + a context (whose hole is denoted here with special_meta)
val match_subterm :
Environ.env ->
Evd.evar_map ->
(binding_bound_vars * instantiated_pattern) ->
EConstr.constr ->
matching_result IStream.tmatch_subterm pat c returns the substitution and the context corresponding to each **closed** subterm of c matching pat, considering application contexts as well.
val is_matching_appsubterm :
?closed:bool ->
Environ.env ->
Evd.evar_map ->
Pattern.constr_pattern ->
EConstr.constr ->
boolis_matching_appsubterm pat c tells if a subterm of c matches against pat taking partial subterms into consideration