]> matita.cs.unibo.it Git - helm.git/blobdiff - helm/ocaml/tactics/proofEngineHelpers.ml
locate_in_* functions generalized to handle equalities in a context.
[helm.git] / helm / ocaml / tactics / proofEngineHelpers.ml
index 284098f3bae4fba29446eb66388b56b641380f2f..5c9b1f7a0ef46e7ddded1ea53911c7d5852b93b0 100644 (file)
@@ -570,11 +570,11 @@ exception Fail of string
 * [equality] defaults to physical equality
 * [context] must be the context of [where]
 *)
-let locate_in_term ?(equality=(==))what ~where context =
+let locate_in_term ?(equality=(fun _ -> (==))) what ~where context =
   let add_ctx context name entry =
       (Some (name, entry)) :: context in
   let rec aux context where =
-   if equality what where then [context,where]
+   if equality context what where then [context,where]
    else
     match where with
     | Cic.Implicit _
@@ -617,13 +617,13 @@ let locate_in_term ?(equality=(==))what ~where context =
   in
    aux context where
 
-(** locate_in_term equality what where context
+(** locate_in_conjecture equality what where context
 * [what] must match a subterm of [where] according to [equality]
 * It returns the matched terms together with their contexts in [where]
 * [equality] defaults to physical equality
 * [context] must be the context of [where]
 *)
-let locate_in_conjecture ?(equality=(==)) what (_,context,ty) =
+let locate_in_conjecture ?(equality=fun _ -> (==)) what (_,context,ty) =
  let context,res =
   List.fold_right
    (fun entry (context,res) ->