anchor.diff:        let lnum = if init then 2 else lnum in
   
         doc ^^ repeat lnum hardline
  +
   
   (* [separate_map_with_comments prefix sep f xs extract_meta] is the document *)
   (*                                                                            *)
  
positive.code:     let es = extract_from_ref_set e in
      surround 2 0 (bang ^^ lbrace) (separate_map_or_flow (comma ^^ break1) p_appTerm es) rbrace
  
    (* KM : I still think that it is wrong to print a term that's not parseable... *)
    | Labeled (e, s, b) ->
        (* JP: what is this? can we remove it? *)
        str ("(*" ^ s ^ "*)") ^/^ p_term false false e
  
    (* Failure cases : these cases are not handled in the printing grammar since *)
    (* they are considered as invalid AST. We try to fail as soon as possible in order *)
    (* to prevent the pretty printer from looping *)
  
negative.code:   in
    let rec all_binders e l =
      match e.tm with
      | Product(bs, tgt) ->
        if List.for_all is_binder_annot bs then
          all_binders tgt (l+ List.length bs)
        else
          (false, 0)
      | _ -> (true, l+1)
    in
    let b, l = all_binders e 0 in
  