Skip to content

Commit

Permalink
Add operators to compile with OCaml ≥ 4.00.0
Browse files Browse the repository at this point in the history
  • Loading branch information
smondet committed Dec 28, 2013
1 parent 3e6830a commit 3a1c1f3
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion smartPrint.ml
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
external (|>) : 'a -> ('a -> 'b) -> 'b = "%revapply";;
external ( @@ ) : ('a -> 'b) -> 'a -> 'b = "%apply"

(* Separators. *)
module Break = struct
(* A break can be a whitespace or a newline if the text has to be splited. *)
Expand Down Expand Up @@ -418,4 +421,4 @@ let to_out_channel (width : int) (tab : int) (c : out_channel) (d : t) : unit =
(output_char c) (output_string c) output_sub_string d

let to_stdout (width : int) (tab : int) (d : t) : unit =
to_out_channel width tab stdout d
to_out_channel width tab stdout d

0 comments on commit 3a1c1f3

Please sign in to comment.