consolidate_body more thoroughly, e.g. for reduced ML_Heap.obj_size;
authorwenzelm
Wed, 18 Aug 2021 16:13:40 +0200
changeset 74426 0faa68dedce5
parent 74424 62b0577123a5
child 74427 ecf80e37ed1a
consolidate_body more thoroughly, e.g. for reduced ML_Heap.obj_size;
src/Pure/proofterm.ML
--- a/src/Pure/proofterm.ML	Mon Aug 16 23:07:01 2021 +0200
+++ b/src/Pure/proofterm.ML	Wed Aug 18 16:13:40 2021 +0200
@@ -266,6 +266,8 @@
   maps (fn PBody {thms, ...} => map (thm_node_consolidate o #2) thms)
   #> Lazy.consolidate #> map Lazy.force #> ignore;
 
+val consolidate_body = consolidate_bodies o single;
+
 fun make_thm_node theory_name name prop body export =
   let
     val consolidate =
@@ -1981,7 +1983,7 @@
     fun fulfill () =
       postproc (fulfill_norm_proof thy (map (apsnd Future.join) promises) (Future.join body));
   in
-    if null promises then Future.map postproc body
+    if null promises then Future.map (postproc #> tap consolidate_body) body
     else if Future.is_finished body andalso length promises = 1 then
       Future.map (fn _ => fulfill ()) (snd (hd promises))
     else