ligo/lib_stdlib/utils.mli

33 lines
1.3 KiB
OCaml
Raw Normal View History

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. *)
(* *)
(**************************************************************************)
module Infix : sig
2016-09-08 21:13:10 +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
end
2016-09-08 21:13:10 +04:00
(** Print a paragraph in a box **)
val display_paragraph: Format.formatter -> string -> unit
(** [finalize f g ] ensures g() called after f(), even if exception raised **)
val finalize: (unit -> 'a) -> (unit -> unit) -> 'a
(** Return contents of file at given filename. **)
val read_file: ?bin:bool -> string -> string
(** [write_file p c] writes c to file at path p **)
val write_file: ?bin:bool -> string -> string -> unit
val mkdir: string -> unit