package extlib

  1. Overview
  2. Docs
A complete yet small extension for OCaml standard library (reduced, recommended)

Install

Dune Dependency

Authors

Maintainers

Sources

extlib-1.7.7.tar.gz
md5=2c620993aecd4b31b3a362b21b55dd94
sha256=4183abeca72efefc2513a440706c0e6e56d4676f60ae89a4306f8e5e03fbb5eb
sha512=4f3d6f5bc29c43254ad9f927213fca4afb8a74afbfbaca01ae7e540ea4509f2583aeedd91da8d5252843dd0998093e6e02801a4e95a70a04c6f7229b2b817bf3

doc/extlib/Std/index.html

Module Std

Additional functions.

val input_lines : in_channel -> string Enum.t

Returns an enumeration over lines of an input channel, as read by the input_line function.

val input_chars : in_channel -> char Enum.t

Returns an enumeration over characters of an input channel.

val input_list : in_channel -> string list

Returns the list of lines read from an input channel.

val input_all : in_channel -> string

Return the whole contents of an input channel as a single string.

val print_bool : bool -> unit

Print a boolean to stdout.

val prerr_bool : bool -> unit

Print a boolean to stderr.

val input_file : ?bin:bool -> string -> string

returns the data of a given filename.

val output_file : filename:string -> text:string -> unit

creates a filename, write text into it and close it.

val string_of_char : char -> string

creates a string from a char.

val identity : 'a -> 'a

the identity function.

val unique : unit -> int

returns an unique identifier every time it is called.

val dump : 'a -> string

represent a runtime value as a string. Since types are lost at compile time, the representation might not match your type. For example, None will be printed 0 since they share the same runtime representation.

val print : 'a -> unit

print the representation of a runtime value on stdout. See remarks for dump.

val finally : (unit -> unit) -> ('a -> 'b) -> 'a -> 'b

finally fend f x calls f x and then fend() even if f x raised an exception.

OCaml

Innovation. Community. Security.