]> matita.cs.unibo.it Git - helm.git/blobdiff - helm/ocaml/cic_omdoc/cic2acic.ml
New handling of substitution:
[helm.git] / helm / ocaml / cic_omdoc / cic2acic.ml
index 37e56406e61db0b40b1d589287361a0323323e50..f86e22f842d7ee23392357d639e4284f384c0ae3 100644 (file)
@@ -113,7 +113,9 @@ let acic_of_cic_context' seed ids_to_terms ids_to_father_ids ids_to_inner_sorts
         | C.Meta _       ->
 prerr_endline "Cic2acic: string_of_sort applied to a meta" ;
            "?"
-        | _              -> assert false
+        | t              ->
+prerr_endline ("Cic2acic: string_of_sort applied to: " ^ CicPp.ppterm t) ;
+            assert false
       in
        let ainnertypes,innertype,innersort,expected_available =
 (*CSC: Here we need the algorithm for Coscoy's double type-inference  *)
@@ -192,9 +194,7 @@ Cic.Sort (Cic.Type (CicUniv.fresh())); (* TASSI: non dovrebbe fare danni *)
              in
               C.AVar (fresh_id'', uri,exp_named_subst')
           | C.Meta (n,l) ->
-             let (_,canonical_context,_) =
-              List.find (function (m,_,_) -> n = m) metasenv
-             in
+             let (_,canonical_context,_) = CicUtil.lookup_meta n metasenv in
              xxx_add ids_to_inner_sorts fresh_id'' innersort ;
              if innersort = "Prop"  && expected_available then
               add_inner_type fresh_id'' ;