]> matita.cs.unibo.it Git - helm.git/blobdiff - helm/ocaml/cic_omdoc/eta_fixing.ml
debian version 0.0.6-6
[helm.git] / helm / ocaml / cic_omdoc / eta_fixing.ml
index 6d5ce9833e86a6b592b91b531c2fd1c9f2da3bef..29d22ccb91062051858e1c55f4619b4433e35e35 100644 (file)
@@ -177,10 +177,8 @@ let eta_fix metasenv context t =
       let exp_named_subst' = fix_exp_named_subst context exp_named_subst in
        C.Var (uri,exp_named_subst')
    | C.Meta (n,l) ->
-      let (_,canonical_context,_) =
-       List.find (function (m,_,_) -> n = m) metasenv
-       in
-       let l' =
+      let (_,canonical_context,_) = CicUtil.lookup_meta n metasenv in
+      let l' =
         List.map2
          (fun ct t ->
           match (ct, t) with
@@ -216,7 +214,7 @@ let eta_fix metasenv context t =
              (match CicEnvironment.get_obj uri with
                C.Constant (_,_,ty,_) -> ty
              | C.Variable _ -> raise ReferenceToVariable
-             | C.CurrentProof (_,_,_,_,params) -> raise RferenceToCurrentProof
+             | C.CurrentProof (_,_,_,_,params) -> raise ReferenceToCurrentProof
              | C.InductiveDefinition _ -> raise ReferenceToInductiveDefinition
              ) in 
            fix_according_to_type