]> matita.cs.unibo.it Git - helm.git/commitdiff
Bug fixed: the wrong context was used.
authorClaudio Sacerdoti Coen <claudio.sacerdoticoen@unibo.it>
Mon, 16 Jan 2006 16:02:28 +0000 (16:02 +0000)
committerClaudio Sacerdoti Coen <claudio.sacerdoticoen@unibo.it>
Mon, 16 Jan 2006 16:02:28 +0000 (16:02 +0000)
helm/ocaml/cic_unification/cicRefine.ml

index f01ecf785ed8524f5002d6c3f6e08610a617bdbb..1caeb733db2a21253b996e91893f77df8a0d4878 100644 (file)
@@ -1013,22 +1013,22 @@ and type_of_aux' ?(localization_tbl = Cic.CicHash.create 1) metasenv context t
   and eat_prods 
     allow_coercions subst metasenv context hetype tlbody_and_type ugraph 
   =
-    let rec mk_prod metasenv context =
+    let rec mk_prod metasenv context' =
       function
           [] ->
             let (metasenv, idx) = 
-              CicMkImplicit.mk_implicit_type metasenv subst context 
+              CicMkImplicit.mk_implicit_type metasenv subst context'
             in
             let irl =
-              CicMkImplicit.identity_relocation_list_for_metavariable context
+              CicMkImplicit.identity_relocation_list_for_metavariable context'
             in
               metasenv,Cic.Meta (idx, irl)
         | (_,argty)::tl ->
             let (metasenv, idx) = 
-              CicMkImplicit.mk_implicit_type metasenv subst context 
+              CicMkImplicit.mk_implicit_type metasenv subst context' 
             in
             let irl =
-              CicMkImplicit.identity_relocation_list_for_metavariable context
+              CicMkImplicit.identity_relocation_list_for_metavariable context'
             in
             let meta = Cic.Meta (idx,irl) in
             let name =
@@ -1036,7 +1036,7 @@ and type_of_aux' ?(localization_tbl = Cic.CicHash.create 1) metasenv context t
               (* Nevertheless, argty is well-typed only in context.  *)
               (* Thus I generate a name (name_hint) in context and   *)
               (* then I generate a name --- using the hint name_hint *)
-              (* --- that is fresh in (context'@context).            *)
+              (* --- that is fresh in context'.                      *)
               let name_hint = 
                 (* Cic.Name "pippo" *)
                 FreshNamesGenerator.mk_fresh_name ~subst metasenv 
@@ -1047,10 +1047,10 @@ and type_of_aux' ?(localization_tbl = Cic.CicHash.create 1) metasenv context t
               in
                 (* [] and (Cic.Sort Cic.prop) are dummy: they will not be used *)
                 FreshNamesGenerator.mk_fresh_name ~subst
-                  [] context name_hint ~typ:(Cic.Sort Cic.Prop)
+                  [] context' name_hint ~typ:(Cic.Sort Cic.Prop)
             in
             let metasenv,target =
-              mk_prod metasenv ((Some (name, Cic.Decl meta))::context) tl
+              mk_prod metasenv ((Some (name, Cic.Decl meta))::context') tl
             in
               metasenv,Cic.Prod (name,meta,target)
     in