]> matita.cs.unibo.it Git - helm.git/blobdiff - helm/software/matita/matita.ml
lazy proof term to increase sharing and decrease memory consumption.
[helm.git] / helm / software / matita / matita.ml
index 64d1a4513ebed04a6c7fa8427aa8094a9f4b3da3..d63e327f03b89e8d68a58b7ce2a80e68e945ff78 100644 (file)
@@ -171,8 +171,10 @@ let _ =
             (MatitaScript.current ())#grafite_status.GrafiteTypes.proof_status
             with
             | GrafiteTypes.No_proof -> (Cic.Implicit None)
-            | Incomplete_proof i -> let _,_,_subst,p,_, _ = i.GrafiteTypes.proof in p
-            | Proof p -> let _,_,_subst,p,_, _ = p in p
+            | Incomplete_proof i -> 
+                 let _,_,_subst,p,_, _ = i.GrafiteTypes.proof in 
+                 Lazy.force p
+            | Proof p -> let _,_,_subst,p,_, _ = p in Lazy.force p
             | Intermediate _ -> assert false)));
      addDebugItem "Print current proof (natural language) to stderr" 
        (fun _ -> 
@@ -186,9 +188,9 @@ let _ =
             | GrafiteTypes.No_proof -> assert false
             | Incomplete_proof i -> 
                 let _,m,_subst,p,ty, attrs = i.GrafiteTypes.proof in 
-                Cic.CurrentProof ("current (incomplete) proof",m,p,ty,[],attrs)
+                Cic.CurrentProof ("current (incomplete) proof",m,Lazy.force p,ty,[],attrs)
             | Proof (_,m,_subst,p,ty, attrs) -> 
-                Cic.CurrentProof ("current proof",m,p,ty,[],attrs)
+                Cic.CurrentProof ("current proof",m,Lazy.force p,ty,[],attrs)
             | Intermediate _ -> assert false)));
 (*     addDebugItem "ask record choice"
       (fun _ ->