| Elim (t, xu, s) -> mk_note s :: cont sep (mk_elim t xu :: a)
| Apply (t, s) -> mk_note s :: cont sep (mk_apply t :: a)
| Branch ([], s) -> a
- | Branch ([ps], s) -> cont sep (render_steps a ps)
+ | Branch ([ps], s) -> render_steps sep a ps
| Branch (pss, s) ->
let a = mk_ob :: a in
- let body = mk_cb :: list_rev_map_concat render_steps mk_vb a pss in
+ let body = mk_cb :: list_rev_map_concat (render_steps None) mk_vb a pss in
mk_note s :: cont sep body
-and render_steps a = function
+and render_steps sep a = function
| [] -> a
- | [p] -> render_step None a p
- | (Note _ | Theorem _ | Qed _ as p) :: ps ->
- render_steps (render_step None a p) ps
- | p :: ((Branch ([], _) :: _) as ps) ->
- render_steps (render_step None a p) ps
+ | [p] -> render_step sep a p
+ | p :: Branch ([], _) :: ps ->
+ render_steps sep a (p :: ps)
| p :: ((Branch (_ :: _ :: _, _) :: _) as ps) ->
- render_steps (render_step (Some mk_sc) a p) ps
+ render_steps sep (render_step (Some mk_sc) a p) ps
| p :: ps ->
- render_steps (render_step (Some mk_dot) a p) ps
+ render_steps sep (render_step (Some mk_dot) a p) ps
+
+let render_steps a = render_steps None a
(* counting *****************************************************************)