ocaml-batteries-team/batteries-included — pull request #255 by mjambon (2012-03-07 02:55:48+00:00)
Title: Import of missing signatures from batStd.mli into batPervasives.mli

Please check whether `input_file` and `output_file` should be renamed (or aliased and deprecated). Details below.

The following used to be invisible to ocamldoc. They still are, using
(**/**):

```ocaml
val input_lines : Pervasives.in_channel -> string BatEnum.t
val input_chars : Pervasives.in_channel -> char BatEnum.t
val input_list : Pervasives.in_channel -> string list
val input_all : Pervasives.in_channel -> string
```

The following two functions were added to `batPervasives.mli`
with their original names. Their names however are not consistent
with other functions of `BatPervasives`. One would expect `input_file`
and `output_file` to operate
on channels (`BatIO.input`/`output`) rather than file names:

```ocaml
val input_file : ?bin:bool -> string -> string
val output_file : filename:string -> text:string -> unit
```

`print` became `print_any` because there was already a (deprecated)
function named `print`. Also, its type has changed:

```ocaml
(* before, in BatStd: *)
val print : 'a -> unit

(* after, in BatPervasives: *)
val print_any : 'b BatIO.output -> 'a -> unit
```

I also added the following signatures that hadn't been copied from
`batStd.mli`:

```ocaml
val forever : ('a -> 'b) -> 'a -> unit
val ignore_exceptions : ('a -> 'b) -> 'a -> unit
val ignore_ok : ('a, exn) result -> unit
val ok : ('a, exn) result -> 'a
val wrap : ('a -> 'b) -> 'a -> ('b, exn) result
```