2016-09-08 21:13:10 +04:00
|
|
|
(**************************************************************************)
|
|
|
|
(* *)
|
2017-11-14 03:36:14 +04:00
|
|
|
(* Copyright (c) 2014 - 2017. *)
|
2016-09-08 21:13:10 +04:00
|
|
|
(* Dynamic Ledger Solutions, Inc. <contact@tezos.com> *)
|
|
|
|
(* *)
|
|
|
|
(* All rights reserved. No warranty, explicit or implicit, provided. *)
|
|
|
|
(* *)
|
|
|
|
(**************************************************************************)
|
|
|
|
|
2017-11-27 09:13:12 +04:00
|
|
|
module Infix : sig
|
2016-09-08 21:13:10 +04:00
|
|
|
|
2017-11-27 09:13:12 +04:00
|
|
|
(** Compose functions from right to left. *)
|
|
|
|
val (<<) : ('b -> 'c) -> ('a -> 'b) -> 'a -> 'c
|
|
|
|
|
|
|
|
(** Sequence: [i--j] is the sequence [i;i+1;...;j-1;j] *)
|
|
|
|
val (--) : int -> int -> int list
|
2017-02-24 20:17:53 +04:00
|
|
|
|
2017-11-27 09:13:12 +04:00
|
|
|
end
|
2016-09-08 21:13:10 +04:00
|
|
|
|
2017-11-27 09:13:12 +04:00
|
|
|
(** Print a paragraph in a box **)
|
|
|
|
val display_paragraph: Format.formatter -> string -> unit
|
2017-02-24 20:17:53 +04:00
|
|
|
|
2017-11-27 09:13:12 +04:00
|
|
|
(** [finalize f g ] ensures g() called after f(), even if exception raised **)
|
|
|
|
val finalize: (unit -> 'a) -> (unit -> unit) -> 'a
|
2017-02-24 20:17:53 +04:00
|
|
|
|
2017-11-27 09:13:12 +04:00
|
|
|
(** Return contents of file at given filename. **)
|
|
|
|
val read_file: ?bin:bool -> string -> string
|
2017-02-24 20:17:53 +04:00
|
|
|
|
2017-11-27 09:13:12 +04:00
|
|
|
(** [write_file p c] writes c to file at path p **)
|
|
|
|
val write_file: ?bin:bool -> string -> string -> unit
|
|
|
|
|
2018-01-05 21:37:34 +04:00
|
|
|
val mkdir: ?perm:Unix.file_perm -> string -> unit
|