From a97decb77b2084a3b84c5135f5bae2dbbb5ace26 Mon Sep 17 00:00:00 2001 From: herbelin Date: Sat, 12 Jun 2010 17:53:35 +0000 Subject: Fixed bug #2135 (second-order unification was raising cryptic message) - made the example work (a call to whd_meta was missing) - replaced the internal error messages of w_unify_to_subterm_list into user-understandable messages - incidentally fixed the meaning of whd_meta (which now takes an evd) and meta_name (which now does what it means and do not treat differently the instantiated metas) git-svn-id: svn+ssh://scm.gforge.inria.fr/svn/coq/trunk@13122 85f007b7-540e-0410-9357-904b9bb8a0f7 --- tactics/inv.ml | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'tactics') diff --git a/tactics/inv.ml b/tactics/inv.ml index e732a31c4c..140ddf8f43 100644 --- a/tactics/inv.ml +++ b/tactics/inv.ml @@ -45,8 +45,9 @@ let collect_meta_variables c = let check_no_metas clenv ccl = if occur_meta ccl then - let metas = List.filter (fun na -> na<>Anonymous) - (List.map (Evd.meta_name clenv.evd) (collect_meta_variables ccl)) in + let metas = List.filter (fun m -> not (Evd.meta_defined clenv.evd m)) + (collect_meta_variables ccl) in + let metas = List.map (Evd.meta_name clenv.evd) metas in errorlabstrm "inversion" (str ("Cannot find an instantiation for variable"^ (if List.length metas = 1 then " " else "s ")) ++ -- cgit v1.2.3