aboutsummaryrefslogtreecommitdiffhomepage
path: root/engine
diff options
context:
space:
mode:
authorGravatar Pierre-Marie Pédrot <pierre-marie.pedrot@inria.fr>2016-11-21 12:13:05 +0100
committerGravatar Pierre-Marie Pédrot <pierre-marie.pedrot@inria.fr>2017-02-14 17:30:34 +0100
commit0cdb7e42f64674e246d4e24e3c725e23ceeec6bd (patch)
tree101bd3bc2e05eb52bfc142587d425f8920671b25 /engine
parente09f3b44bb381854b647a6d9debdeddbfc49177e (diff)
Reductionops now return EConstrs.
Diffstat (limited to 'engine')
-rw-r--r--engine/termops.ml3
-rw-r--r--engine/termops.mli1
2 files changed, 4 insertions, 0 deletions
diff --git a/engine/termops.ml b/engine/termops.ml
index abaa409bd..879d77de2 100644
--- a/engine/termops.ml
+++ b/engine/termops.ml
@@ -692,6 +692,9 @@ type meta_type_map = (metavariable * types) list
type meta_value_map = (metavariable * constr) list
+let isMetaOf sigma mv c =
+ match EConstr.kind sigma c with Meta mv' -> Int.equal mv mv' | _ -> false
+
let rec subst_meta bl c =
match kind_of_term c with
| Meta i -> (try Int.List.assoc i bl with Not_found -> c)
diff --git a/engine/termops.mli b/engine/termops.mli
index 426b5f34d..1699d600e 100644
--- a/engine/termops.mli
+++ b/engine/termops.mli
@@ -130,6 +130,7 @@ val occur_term : Evd.evar_map -> EConstr.t -> EConstr.t -> bool (** Synonymous o
(* Substitution of metavariables *)
type meta_value_map = (metavariable * constr) list
val subst_meta : meta_value_map -> constr -> constr
+val isMetaOf : Evd.evar_map -> metavariable -> EConstr.constr -> bool
(** Type assignment for metavariables *)
type meta_type_map = (metavariable * types) list