SHARE
TWEET

Untitled

a guest Feb 16th, 2019 70 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. --- a/typing/stypes.ml  2012-05-30 15:29:48.000000000 +0200
  2. +++ b/typing/stypes.ml  2013-06-04 12:46:13.897524763 +0200
  3. @@ -117,9 +117,9 @@
  4.  
  5.  let print_ident_annot pp str k =
  6.    match k with
  7. -  | Idef l -> fprintf pp "def %s %a@." str print_location l;
  8. -  | Iref_internal l -> fprintf pp "int_ref %s %a@." str print_location l;
  9. -  | Iref_external -> fprintf pp "ext_ref %s@." str;
  10. +  | Idef l -> fprintf pp "def %s %a@\n" str print_location l;
  11. +  | Iref_internal l -> fprintf pp "int_ref %s %a@\n" str print_location l;
  12. +  | Iref_external -> fprintf pp "ext_ref %s@\n" str;
  13.  ;;
  14.  
  15.  (* The format of the annotation file is documented in emacs/caml-types.el. *)
  16. @@ -129,22 +129,22 @@
  17.    | Ti_class _ | Ti_mod _ -> prev_loc
  18.    | Ti_pat  {pat_loc = loc; pat_type = typ}
  19.    | Ti_expr {exp_loc = loc; exp_type = typ} ->
  20. -      if loc <> prev_loc then fprintf pp "%a@." print_location loc;
  21. -      fprintf pp "type(@.  ";
  22. +      if loc <> prev_loc then fprintf pp "%a@\n" print_location loc;
  23. +      fprintf pp "type(@\n  ";
  24.        printtyp_reset_maybe loc;
  25.        Printtyp.mark_loops typ;
  26.        Printtyp.type_sch pp typ;
  27. -      fprintf pp "@.)@.";
  28. +      fprintf pp "@\n)@\n";
  29.        loc
  30.    | An_call (loc, k) ->
  31. -      if loc <> prev_loc then fprintf pp "%a@." print_location loc;
  32. -      fprintf pp "call(@.  %s@.)@." (call_kind_string k);
  33. +      if loc <> prev_loc then fprintf pp "%a@\n" print_location loc;
  34. +      fprintf pp "call(@\n  %s@\n)@\n" (call_kind_string k);
  35.        loc
  36.    | An_ident (loc, str, k) ->
  37. -      if loc <> prev_loc then fprintf pp "%a@." print_location loc;
  38. -      fprintf pp "ident(@.  ";
  39. +      if loc <> prev_loc then fprintf pp "%a@\n" print_location loc;
  40. +      fprintf pp "ident(@\n  ";
  41.        print_ident_annot pp str k;
  42. -      fprintf pp ")@.";
  43. +      fprintf pp ")@\n";
  44.        loc
  45.  ;;
  46.  
  47. @@ -163,6 +163,7 @@
  48.          | Some filename -> formatter_of_out_channel (open_out filename) in
  49.      sort_filter_phrases ();
  50.      ignore (List.fold_left (print_info pp) Location.none info);
  51. +    pp_print_flush pp ();
  52.      phrases := [];
  53.    end else begin
  54.      annotations := [];
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top