]> matita.cs.unibo.it Git - helm.git/commitdiff
Bug fixed: if the context of a sequent was empty a vertical box without content
authorClaudio Sacerdoti Coen <claudio.sacerdoticoen@unibo.it>
Sat, 20 Jan 2007 15:31:18 +0000 (15:31 +0000)
committerClaudio Sacerdoti Coen <claudio.sacerdoticoen@unibo.it>
Sat, 20 Jan 2007 15:31:18 +0000 (15:31 +0000)
was generated. This is not allowed by BoxPp (assert failure).

components/content_pres/sequent2pres.ml

index 88c804b7d6a199fce46ae1b836960d8f6b024a1d..391b178a27c3036fbfa450e1ea9240b7d2ff9968 100644 (file)
@@ -83,16 +83,17 @@ let sequent2pres term2pres (_,_,context,ty) =
          aux (r::accum) tl
       | _::_ -> assert false in
       aux [] context in
- let pres_context = (Box.b_v [] (context2pres context)) in
+ let pres_context =
+  if context <> [] then [Box.b_v [] (context2pres context)] else [] in
  let pres_goal = term2pres ty in 
  (Box.b_h [] [
    Box.b_space; 
    (Box.b_v []
-      [Box.b_space;
-       pres_context;
+      (Box.b_space ::
+       pres_context @ [
        b_ink [None,"width","4cm"; None,"height","2px"]; (* sequent line *)
        Box.b_space; 
-       pres_goal])])
+       pres_goal]))])
 
 let sequent2pres ~ids_to_inner_sorts =
   sequent2pres