Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Removed trailing whitespace

  • Loading branch information...
commit 162ba82d6927e5662d19ca50924964144b7acea9 1 parent 3567290
@toton toton authored
Showing with 398 additions and 398 deletions.
  1. +2 −2 src/batArg.mli
  2. +2 −2 src/batBase64.mli
  3. +5 −5 src/batBig_int.mli
  4. +3 −3 src/batBitSet.mli
  5. +3 −3 src/batBool.mli
  6. +5 −5 src/batBuffer.mli
  7. +2 −2 src/batCache.mli
  8. +5 −5 src/batChar.mli
  9. +3 −3 src/batCharParser.mli
  10. +24 −24 src/batComplex.mli
  11. +6 −6 src/batConcurrent.mli
  12. +11 −11 src/batDllist.mli
  13. +2 −2 src/batDynArray.mli
  14. +10 −10 src/batFile.mli
  15. +53 −53 src/batFloat.mli
  16. +1 −1  src/batFormat.mli
  17. +2 −2 src/batGc.mli
  18. +3 −3 src/batGenlex.mli
  19. +6 −6 src/batGlobal.mli
  20. +42 −42 src/batIO.mli
  21. +45 −45 src/batInnerIO.mli
  22. +3 −3 src/batLexing.mli
  23. +5 −5 src/batLog.mli
  24. +4 −4 src/batMarshal.mli
  25. +4 −4 src/batMultiPMap.mli
  26. +1 −1  src/batMutex.mli
  27. +17 −17 src/batNum.mli
  28. +17 −17 src/batOo.mli
  29. +4 −4 src/batParserCo.mli
  30. +21 −21 src/batPrintf.mli
  31. +6 −6 src/batQueue.mli
  32. +1 −1  src/batRMutex.mli
  33. +5 −5 src/batRandom.mli
  34. +6 −6 src/batRef.mli
  35. +1 −1  src/batResult.mli
  36. +5 −5 src/batReturn.mli
  37. +2 −2 src/batSeq.mli
  38. +2 −2 src/batStack.ml
  39. +6 −6 src/batStack.mli
  40. +2 −2 src/batStr.mli
  41. +6 −6 src/batTuple.mli
  42. +3 −3 src/batUnit.ml
  43. +5 −5 src/batUnit.mli
  44. +20 −20 src/batUnix.mli
  45. +14 −14 src/batVect.mli
  46. +1 −1  src/batteriesConfig.mlp
  47. +2 −2 src/batteriesHelp.mli
View
4 src/batArg.mli
@@ -1,8 +1,8 @@
-(*
+(*
* ExtArg - Additional operations on arguments
* Copyright (C) 1996 Damien Doligez
* 2009 David Teller, LIFO, Universite d'Orleans
- *
+ *
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
* License as published by the Free Software Foundation; either
View
4 src/batBase64.mli
@@ -1,7 +1,7 @@
(*
* Base64 - Base64 codec
* Copyright (C) 2003 Nicolas Cannasse
- *
+ *
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
* License as published by the Free Software Foundation; either
@@ -22,7 +22,7 @@
8-bit characters are encoded into 6-bit ones using ASCII lookup tables.
Default tables maps 0..63 values on characters A-Z, a-z, 0-9, '+' and '/'
- (in that order).
+ (in that order).
@documents Base64
View
10 src/batBig_int.mli
@@ -21,13 +21,13 @@
(** Operations on arbitrary-precision integers.
-
+
Big integers (type {!big_int} or equivalently {!Big_int.t}) are
signed integers of arbitrary size. This module lets you compute
with huge numbers, whose size is limited only by the amount of
memory given to OCaml. The downside is speed, as big integers
are much slower than any other type of integer known to OCaml.
-
+
This module extends Stdlib's
{{:http://caml.inria.fr/pub/docs/manual-ocaml/libref/Big_int.html}Big_int}
module, go there for documentation on the rest of the functions
@@ -37,10 +37,10 @@
@author Gabriel Scherer
@author David Teller
*)
-
+
open Nat
open Big_int
-
+
type t = big_int
val zero : big_int
@@ -167,7 +167,7 @@ val float_of_big_int : big_int -> float
module Infix : BatNumber.Infix with type bat__infix_t = t
module Compare : BatNumber.Compare with type bat__compare_t = t
-
+
(**/**)
(** {6 For internal use} *)
View
6 src/batBitSet.mli
@@ -20,11 +20,11 @@
*)
(** Efficient bit sets.
-
+
A bitset is an array of boolean values that can be accessed with indexes
like an array but provides a better memory usage (divided by 8) for a
- very small speed trade-off.
-
+ very small speed trade-off.
+
@author Nicolas Cannasse
@author David Teller (Boilerplate code)
*)
View
6 src/batBool.mli
@@ -1,8 +1,8 @@
-(*
+(*
* ExtBool - Extended booleans
* Copyright (C) 2007 Bluestorm <bluestorm dot dylc on-the-server gmail dot com>
* 2008 David Teller
- *
+ *
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
* License as published by the Free Software Foundation; either
@@ -20,7 +20,7 @@
*)
(**Operations on booleans
-
+
@author Gabriel Scherer
@author David Teller
*)
View
10 src/batBuffer.mli
@@ -1,9 +1,9 @@
-(*
+(*
* ExtBuffer - Additional buffer operations
* Copyright (C) 1999 Pierre Weis, Xavier Leroy
* 2009 David Teller, LIFO, Universite d'Orleans
* 2009 Dawid Toton
- *
+ *
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
* License as published by the Free Software Foundation; either
@@ -28,7 +28,7 @@
in quasi-linear time (instead of quadratic time when strings are
concatenated pairwise).
-
+
This module extends Stdlib's
{{:http://caml.inria.fr/pub/docs/manual-ocaml/libref/Buffer.html}Buffer}
module, go there for documentation on the rest of the functions
@@ -43,7 +43,7 @@ open Buffer
val enum : t -> char BatEnum.t
- (** Returns an enumeration of the characters of a buffer.
+ (** Returns an enumeration of the characters of a buffer.
Contents of the enumeration is unspecified if the buffer is modified after
the enumeration is returned.*)
@@ -56,7 +56,7 @@ val blit : t -> int -> string -> int -> int -> unit
(** [Buffer.blit b srcoff dst dstoff len] copies [len] characters from
the current contents of the buffer [b] starting at offset [off],
starting at character number [srcoff], to string [dst], starting at
- character number [dstoff].
+ character number [dstoff].
@raise Invalid_argument if [srcoff] and [len] do not designate a
valid substring of the buffer, or if [dstoff] and [len] do not
View
4 src/batCache.mli
@@ -20,8 +20,8 @@
type ('a,'b) manual_cache = {
- get : 'a -> 'b;
- del : 'a -> unit;
+ get : 'a -> 'b;
+ del : 'a -> unit;
enum: unit -> ('a * 'b) BatEnum.t
}
View
10 src/batChar.mli
@@ -1,8 +1,8 @@
-(*
+(*
* ExtChar - Additional character operations
* Copyright (C) 1996 Xavier Leroy
* 2008 David Teller
- *
+ *
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
* License as published by the Free Software Foundation; either
@@ -19,13 +19,13 @@
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*)
-(** Operations on characters.
+(** Operations on characters.
Characters range upon Latin-1 encoding, i.e. languages used in
Western Europe and North America. For international characters,
another, richer, module is provided: {!UChar}.
-
+
This module extends Stdlib's
{{:http://caml.inria.fr/pub/docs/manual-ocaml/libref/Char.html}Char}
module, go there for documentation on the rest of the functions
@@ -37,7 +37,7 @@
val is_whitespace : char -> bool
(** Determine if a character is a whitespace.
- Whitespace characters are defined as
+ Whitespace characters are defined as
[' '], ['\010'], ['\013'], ['\009'], ['\026']
and ['\012']. *)
View
6 src/batCharParser.mli
@@ -1,4 +1,4 @@
-(*
+(*
* CharParser - Parsing character strings
* Copyright (C) 2008 David Teller
*
@@ -18,7 +18,7 @@
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*)
-(** Parsing character strings.
+(** Parsing character strings.
This module defines common functions for parsing character strings,
encoded in Latin-1. These functions are meant to be used in conjunction
@@ -40,7 +40,7 @@ type position =
}
val advance : char -> position -> position
-(**Advance by one char.
+(**Advance by one char.
[advance c p] returns a new position advanced by one char. If [c] is '\r' or '\n',
the result is [{offset = 0; line = p.line + 1}]. Other wise, the result is
View
48 src/batComplex.mli
@@ -1,8 +1,8 @@
-(*
+(*
* ExtComplex - Extended Complex
* Copyright (C) 2007 Bluestorm <bluestorm dot dylc on-the-server gmail dot com>
* 2008 David Teller
- *
+ *
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
* License as published by the Free Software Foundation; either
@@ -22,80 +22,80 @@
(** Additional and modified functions for complex numbers.*)
(** Complex numbers.
-
+
This module provides arithmetic operations on complex numbers.
Complex numbers are represented by their real and imaginary parts
(cartesian representation). Each part is represented by a
- double-precision floating-point number (type {!float}).
-
+ double-precision floating-point number (type {!float}).
+
@author Xavier Leroy (base module)
@author Gabriel Scherer
@author David Teller
*)
type t = Complex.t
-
+
val zero: t
(** The complex number [0]. *)
-
+
val one: t
(** The complex number [1]. *)
-
+
val i: t
(** The complex number [i]. *)
-
+
val neg: t -> t
(** Unary negation. *)
-
+
val conj: t -> t
(** Conjugate: given the complex [x + i.y], returns [x - i.y]. *)
-
+
val add: t -> t -> t
(** Addition *)
-
+
val sub: t -> t -> t
(** Subtraction *)
-
+
val mul: t -> t -> t
(** Multiplication *)
-
+
val inv: t -> t
(** Multiplicative inverse ([1/z]). *)
-
+
val div: t -> t -> t
(** Division *)
-
+
val sqrt: t -> t
(** Square root. The result [x + i.y] is such that [x > 0] or
[x = 0] and [y >= 0].
This function has a discontinuity along the negative real axis. *)
-
+
val norm2: t -> float
(** Norm squared: given [x + i.y], returns [x^2 + y^2]. *)
-
+
val norm: t -> float
(** Norm: given [x + i.y], returns [sqrt(x^2 + y^2)]. *)
-
+
val arg: t -> float
(** Argument. The argument of a complex number is the angle
in the complex plane between the positive real axis and a line
passing through zero and the number. This angle ranges from
[-pi] to [pi]. This function has a discontinuity along the
negative real axis. *)
-
+
val polar: float -> float -> t
(** [polar norm arg] returns the complex having norm [norm]
and argument [arg]. *)
-
+
val exp: t -> t
(** Exponentiation. [exp z] returns [e] to the [z] power. *)
-
+
val log: t -> t
(** Natural logarithm (in base [e]). *)
-
+
val pow: t -> t -> t
(** Power function. [pow z1 z2] returns [z1] to the [z2] power. *)
-
+
val operations : t BatNumber.numeric
val inv : t -> t
View
12 src/batConcurrent.mli
@@ -1,7 +1,7 @@
-(*
+(*
* Concurrent - Generic interface for concurrent operations
* Copyright (C) 2008 David Teller, LIFO, Universite d'Orleans
- *
+ *
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
* License as published by the Free Software Foundation; either
@@ -40,7 +40,7 @@ val create: enter:(unit -> unit) -> leave:(unit -> unit) -> lock
@param enter Enter critical section.
@param leave Leave critical section.
.*)
-
+
val nolock : lock
(** A lock which does nothing.*)
@@ -50,7 +50,7 @@ val synchronize: (unit -> lock) -> ('a -> 'b) -> 'a -> 'b
[f] but whose executions are protected by one lock obtained from
[locker]. The same lock will be reused for all subsequent uses of
[f'].
-
+
For instance,
[synchronize Mutex.make f] is a new function whose executions
will by synchronized by a new lock. Conversely,
@@ -76,7 +76,7 @@ val compose : lock -> lock -> lock
module type BaseLock =
sig
type t(**The type of a lock.*)
-
+
val create:unit -> t
val lock : t -> unit
val unlock:t -> unit
@@ -87,7 +87,7 @@ end
module type Lock =
sig
type t(**The type of a lock.*)
-
+
val create: unit -> t
val lock : t -> unit
val unlock: t -> unit
View
22 src/batDllist.mli
@@ -33,7 +33,7 @@
*)
-type 'a node_t (* abstract *)
+type 'a node_t (* abstract *)
type 'a t = 'a node_t (*For uniformity*)
(**
The type of a non-empty doubly-linked list.
@@ -104,7 +104,7 @@ val rev_drop : 'a node_t -> 'a node_t
separate the nodes between [n1] and [n2] from the rest of the list. In this
case, those nodes become a discrete list by themselves. This is an O(1)
operation.
-*)
+*)
val splice : 'a node_t -> 'a node_t -> unit
(** Given a node, get the data associated with that node. This is an
@@ -117,17 +117,17 @@ val get : 'a node_t -> 'a
*)
val set : 'a node_t -> 'a -> unit
-(** Given a node, get the next element in the list after the node.
+(** Given a node, get the next element in the list after the node.
- The list is circular, so the last node of the list returns the first
+ The list is circular, so the last node of the list returns the first
node of the list as it's next node.
-
+
This is an O(1) operation.
*)
val next : 'a node_t -> 'a node_t
(** Given a node, get the previous element in the list before the node.
-
+
The list is circular, so the first node of the list returns the
last element of the list as it's previous node.
@@ -146,7 +146,7 @@ val skip : 'a node_t -> int -> 'a node_t
*)
val iter : ('a -> unit) -> 'a node_t -> unit
-(** Accumulate a value over the entire list.
+(** Accumulate a value over the entire list.
This works like List.fold_left. This is an O(N) operation.
*)
val fold_left : ('a -> 'b -> 'a) -> 'a -> 'b node_t -> 'a
@@ -160,7 +160,7 @@ val fold_right : ('a -> 'b -> 'b) -> 'a node_t -> 'b -> 'b
val find : ('a -> bool) -> 'a node_t -> 'a node_t
(** [find p l] returns the first element, [l] or after, for which [p]
- returns true.
+ returns true.
@raise Not_found if no such element exists
@added 1.4.0
@@ -169,7 +169,7 @@ val find : ('a -> bool) -> 'a node_t -> 'a node_t
val for_all : ('a -> bool) -> 'a node_t -> bool
(** Test whether a given predicate returns true for all members of the
given list. O(N) *)
-
+
val exists : ('a -> bool) -> 'a node_t -> bool
(** Test whether there exists an element of the given list for which
the predicate returns true. O(N) *)
@@ -185,7 +185,7 @@ val filter : ('a -> bool) -> 'a node_t -> 'a node_t
(** [filter p l] returns a new list, with entirely new nodes, whose
values are all the elements of the list [l] that satisfy the
predicate [p]. The order of the elements in the input list is
- preserved.
+ preserved.
@raise Empty if the resulting list is empty.*)
@@ -193,7 +193,7 @@ val filter_map : ('a -> 'b option) -> 'a node_t -> 'b node_t
(** [filter_map f l] calls [(f a0) (f a1) ... (f an)] where [a0,a1...an]
are the elements of [l]. It returns a new list of elements [bi]
such as [f ai = Some bi] (when [f] returns [None], the
- corresponding element of [l] is discarded).
+ corresponding element of [l] is discarded).
@raise Empty if the resulting list is empty.*)
View
4 src/batDynArray.mli
@@ -189,14 +189,14 @@ val keep : ('a -> bool) -> 'a t -> unit
val filter : ('a -> bool) -> 'a t -> 'a t
(** [filter p a] returns all the elements of the array [a]
that satisfy the predicate [p]. The order of the elements
- in the input array is preserved.
+ in the input array is preserved.
{b Note} This function replaces another function called [filter],
available in previous versions of the library. As the old function
was incompatible with comprehension of dynamic arrays, its name
was changed to {!keep}.
*)
-
+
val filter_map : ('a -> 'b option) -> 'a t -> 'b t
(** [filter_map f e] returns an array consisting in all elements
[x] such that [f y] returns [Some x] , where [y] is an element
View
20 src/batFile.mli
@@ -1,4 +1,4 @@
-(*
+(*
* File - File manipulation
* Copyright (C) 2008 David Teller
*
@@ -20,7 +20,7 @@
(**
File manipulation.
-
+
@author David Teller
*)
@@ -36,7 +36,7 @@ val lines_of : string -> string BatEnum.t
val write_lines: string -> string BatEnum.t -> unit
(** [write_lines name lines] writes strings given by [lines] to file [name] with newline character appended to each line. *)
-
+
val size_of: string -> int
(** [size_of name] returns the size of file [name] in bytes.*)
@@ -46,7 +46,7 @@ val size_of_big: string -> Int64.t
This function is provided as the size of a file larger than 1 Gb cannot
be represented with an [int] on a 32-bit machine.*)
-(** {6 File permissions}
+(** {6 File permissions}
File permissions are used when creating a file to allow controlling which users
may read, write or open that file. To use a permission, create a value of type
@@ -84,15 +84,15 @@ val group_exec: permission
containing the user. Ignored under Windows.*)
val other_read: permission
-(**Give the permission to read the file to the rest
+(**Give the permission to read the file to the rest
of the world. Ignored under Windows.*)
val other_write: permission
-(**Give the permission to modify the file to the rest
+(**Give the permission to modify the file to the rest
of the world. Ignored under Windows.*)
val other_exec: permission
-(**Give the permission to execute the file to the rest
+(**Give the permission to execute the file to the rest
of the world. Ignored under Windows.*)
val perm : permission list -> permission
@@ -131,7 +131,7 @@ val open_in : ?mode:(open_in_flag list) -> ?perm:permission -> string -> input
val with_file_in : ?mode:(open_in_flag list) -> ?perm:permission -> string -> (input -> 'a) -> 'a
(** [with_file_in file_name f] opens the file named [file_name] for reading,
- invokes [f] to process the contents of that file then, once [f] has returned
+ invokes [f] to process the contents of that file then, once [f] has returned
or triggered an exception, closes the file before proceeding. *)
(** {6 Opening a file for writing} *)
@@ -161,7 +161,7 @@ val open_out : ?mode:(open_out_flag list) -> ?perm:permission -> string -> unit
val with_file_out: ?mode:(open_out_flag list) -> ?perm:permission -> string -> (unit output -> 'a) -> 'a
(** [with_file_out file_name f] opens the file named [file_name] for writing,
- invokes [f] to write onto that file then, once [f] has returned or triggered
+ invokes [f] to write onto that file then, once [f] has returned or triggered
an exception, closes the file before proceeding. *)
(** {6 Opening a temporary file for writing} *)
@@ -170,7 +170,7 @@ type open_temporary_out_flag =
[ open_out_flag
| `delete_on_exit (**Should the file be deleted when program ends?*) ]
-val open_temporary_out: ?mode:(open_temporary_out_flag list) -> ?prefix:string -> ?suffix:string -> unit ->
+val open_temporary_out: ?mode:(open_temporary_out_flag list) -> ?prefix:string -> ?suffix:string -> unit ->
(unit output * string)
(** [open_temporary_out ()] opens a new temporary file for writing.
View
106 src/batFloat.mli
@@ -1,8 +1,8 @@
-(*
+(*
* ExtFloat - Extended floats
* Copyright (C) 2007 Bluestorm <bluestorm dot dylc on-the-server gmail dot com>
* 2009 David Rajchenbach-Teller, LIFO, Universite d'Orleans
- *
+ *
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
* License as published by the Free Software Foundation; either
@@ -36,11 +36,11 @@
For more precision, see
{{:http://en.wikipedia.org/wiki/IEEE_754}The Wikipedia entry on
standard IEEE 754}.
-
+
@author Gabriel Scherer
@author David Teller
@author Edgar Friendly
-
+
@documents Float
*)
@@ -111,46 +111,46 @@
external exp : float -> float = "caml_exp_float" "exp" "float"
(** Exponential. *)
-
+
external log : float -> float = "caml_log_float" "log" "float"
(** Natural logarithm. *)
-
+
external log10 : float -> float = "caml_log10_float" "log10" "float"
(** Base 10 logarithm. *)
-
+
external cos : float -> float = "caml_cos_float" "cos" "float"
(** See {!atan2}. *)
-
+
external sin : float -> float = "caml_sin_float" "sin" "float"
(** See {!atan2}. *)
-
+
external tan : float -> float = "caml_tan_float" "tan" "float"
(** See {!atan2}. *)
-
+
external acos : float -> float = "caml_acos_float" "acos" "float"
(** See {!atan2}. *)
-
+
external asin : float -> float = "caml_asin_float" "asin" "float"
(** See {!atan2}. *)
-
+
external atan : float -> float = "caml_atan_float" "atan" "float"
(** See {!atan2}. *)
-
+
external atan2 : float -> float -> float = "caml_atan2_float" "atan2" "float"
(** The usual trigonometric functions. *)
-
+
external cosh : float -> float = "caml_cosh_float" "cosh" "float"
(** See {!tanh}. *)
external sinh : float -> float = "caml_sinh_float" "sinh" "float"
(** See {!tanh}. *)
-
+
external tanh : float -> float = "caml_tanh_float" "tanh" "float"
(** The usual hyperbolic trigonometric functions. *)
-
+
external ceil : float -> float = "caml_ceil_float" "ceil" "float"
(** See {!floor}. *)
-
+
external floor : float -> float = "caml_floor_float" "floor" "float"
(** Round the given float to an integer value.
[floor f] returns the greatest integer value less than or
@@ -170,10 +170,10 @@
val infinity : float
(** Positive infinity. *)
-
+
val neg_infinity : float
(** Negative infinity. *)
-
+
val nan : float
(** A special floating-point value denoting the result of an
undefined operation such as [0.0 /. 0.0]. Stands for
@@ -181,20 +181,20 @@
argument returns [nan] as result. As for floating-point comparisons,
[=], [<], [<=], [>] and [>=] return [false] and [<>] returns [true]
if one or both of their arguments is [nan]. *)
-
+
val is_nan : float -> bool
(** [is_nan f] returns [true] if [f] is [nan], [false] otherwise.*)
val is_special : float -> bool
(** [is_special f] returns [true] if [f] is [nan] or [+/- infinity],
[false] otherwise. *)
-
+
val epsilon : float
(** The smallest positive float [x] such that [1.0 +. x <> 1.0]. *)
-
+
val pi : float
(** The constant pi (3.14159...) *)
-
+
(** {6 Operations on the internal representation of floating-point numbers}*)
external frexp : float -> float * int = "caml_frexp_float"
@@ -203,16 +203,16 @@
significant [x] and the exponent [n] of [f] are equal to
zero. When [f] is non-zero, they are defined by
[f = x *. 2 ** n] and [0.5 <= x < 1.0]. *)
-
+
external ldexp : float -> int -> float = "caml_ldexp_float"
(** [ldexp x n] returns [x *. 2 ** n]. *)
-
+
external modf : float -> float * float = "caml_modf_float"
(** [modf f] returns the pair of the fractional and integral
part of [f]. *)
(** Classes of floating point numbers*)
- type fpkind = Pervasives.fpclass =
+ type fpkind = Pervasives.fpclass =
FP_normal (** Normal number, none of the below *)
| FP_subnormal (** Number very close to 0.0, has reduced precision *)
| FP_zero (** Number is 0.0 or -0.0 *)
@@ -220,7 +220,7 @@
| FP_nan (** Not a number: result of an undefined operation *)
(** The five classes of floating-point numbers, as determined by
the {!classify} function. *)
-
+
external classify : float -> fpkind = "caml_classify_float"
(** Return the class of the given floating-point number:
normal, subnormal, zero, infinite, or not a number. *)
@@ -246,7 +246,7 @@
(**Operations on floating-point numbers, with exceptions raised in
- case of error.
+ case of error.
The operations implemented in this module are the same as the operations
implemented in module {!Float}, with the exception that no operation returns
@@ -267,9 +267,9 @@
For more precision, see
{{:http://en.wikipedia.org/wiki/IEEE_754}The Wikipedia entry on
standard IEEE 754}.
-
+
@author David Teller
-
+
@documents Safe_float
*)
module Safe_float :
@@ -341,46 +341,46 @@ module Safe_float :
val exp : float -> float
(** Exponential. *)
-
+
val log : float -> float
(** Natural logarithm. *)
-
+
val log10 : float -> float
(** Base 10 logarithm. *)
-
+
val cos : float -> float
(** See {!atan2}. *)
-
+
val sin : float -> float
(** See {!atan2}. *)
-
+
val tan : float -> float
(** See {!atan2}. *)
-
+
val acos : float -> float
(** See {!atan2}. *)
-
+
val asin : float -> float
(** See {!atan2}. *)
-
+
val atan : float -> float
(** See {!atan2}. *)
-
+
val atan2 : float -> float -> float
(** The usual trigonometric functions. *)
-
+
val cosh : float -> float
(** See {!tanh}. *)
val sinh : float -> float
(** See {!tanh}. *)
-
+
val tanh : float -> float
(** The usual hyperbolic trigonometric functions. *)
-
+
val ceil : float -> float
(** See {!floor}. *)
-
+
val floor : float -> float
(** Round the given float to an integer value.
[floor f] returns the greatest integer value less than or
@@ -390,10 +390,10 @@ module Safe_float :
val infinity : float
(** Positive infinity. *)
-
+
val neg_infinity : float
(** Negative infinity. *)
-
+
val nan : float
(** A special floating-point value denoting the result of an
undefined operation such as [0.0 /. 0.0]. Stands for
@@ -401,16 +401,16 @@ module Safe_float :
argument returns [nan] as result. As for floating-point comparisons,
[=], [<], [<=], [>] and [>=] return [false] and [<>] returns [true]
if one or both of their arguments is [nan]. *)
-
+
val is_nan : float -> bool
(** [is_nan f] returns [true] if [f] is [nan], [false] otherwise.*)
-
+
val epsilon : float
(** The smallest positive float [x] such that [1.0 +. x <> 1.0]. *)
-
+
val pi : float
(** The constant pi (3.14159...) *)
-
+
(** {6 Operations on the internal representation of floating-point numbers}*)
val frexp : float -> float * int
@@ -419,16 +419,16 @@ module Safe_float :
significant [x] and the exponent [n] of [f] are equal to
zero. When [f] is non-zero, they are defined by
[f = x *. 2 ** n] and [0.5 <= x < 1.0]. *)
-
+
val ldexp : float -> int -> float
(** [ldexp x n] returns [x *. 2 ** n]. *)
-
+
val modf : float -> float * float
(** [modf f] returns the pair of the fractional and integral
part of [f]. *)
(** Classes of floating point numbers*)
- type fpkind = Pervasives.fpclass =
+ type fpkind = Pervasives.fpclass =
FP_normal (** Normal number, none of the below *)
| FP_subnormal (** Number very close to 0.0, has reduced precision *)
| FP_zero (** Number is 0.0 or -0.0 *)
@@ -436,7 +436,7 @@ module Safe_float :
| FP_nan (** Not a number: result of an undefined operation *)
(** The five classes of floating-point numbers, as determined by
the {!classify} function. *)
-
+
external classify : float -> fpkind = "caml_classify_float"
(** Return the class of the given floating-point number:
normal, subnormal, zero, infinite, or not a number. *)
View
2  src/batFormat.mli
@@ -1,4 +1,4 @@
-(*
+(*
* ExtFormat - Extended Format module
* Copyright (C) 1996 Pierre Weis
* 2009 David Teller, LIFO, Universite d'Orleans
View
4 src/batGc.mli
@@ -1,4 +1,4 @@
-(*
+(*
* ExtGC - Extended GC operations
* Copyright (C) 1996 Damien Doligez
* 2008 David Teller, LIFO, Universite d'Orleans
@@ -20,7 +20,7 @@
*)
-(** Memory management control and statistics; finalised values.
+(** Memory management control and statistics; finalised values.
This module extends Stdlib's
{{:http://caml.inria.fr/pub/docs/manual-ocaml/libref/Gc.html}Gc}
View
6 src/batGenlex.mli
@@ -2,7 +2,7 @@
* Genlex - Generic lexer
* Copyright (C) 2002 Jacques Garrigue
* 2008 David Teller (Contributor)
- *
+ *
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
* License as published by the Free Software Foundation; either
@@ -57,7 +57,7 @@ val to_lazy_list_filter: t -> char BatLazyList.t -> token BatLazyList.t
open BatCharParser
module Languages :
sig
-module type Definition =
+module type Definition =
sig
val comment_delimiters : (string * string) option
val line_comment_start : string option
@@ -150,6 +150,6 @@ sig
to ignore following comments.*)
end
-
+
end
View
12 src/batGlobal.mli
@@ -2,7 +2,7 @@
* Global - Mutable global variable
* Copyright (C) 2003 Nicolas Cannasse
* Copyright (C) 2008 David Teller
- *
+ *
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
* License as published by the Free Software Foundation; either
@@ -20,8 +20,8 @@
*)
(** Mutable global variable.
-
- Often in OCaml you want to have a global variable, which is mutable
+
+ Often in OCaml you want to have a global variable, which is mutable
and uninitialized when declared. You can use a ['a option ref] but
this is not very convenient. The Global module provides functions
to easily create and manipulate such variables.
@@ -51,13 +51,13 @@ val get : 'a t -> 'a
(** Get the global value contents - raise Global_not_initialized if not
defined. *)
-val undef : 'a t -> unit
+val undef : 'a t -> unit
(** Reset the global value contents to undefined. *)
-val isdef : 'a t -> bool
+val isdef : 'a t -> bool
(** Return [true] if the global value has been set. *)
-val opt : 'a t -> 'a option
+val opt : 'a t -> 'a option
(** Return [None] if the global is undefined, else [Some v] where v is the
current global value contents. *)
View
84 src/batIO.mli
@@ -1,4 +1,4 @@
-(*
+(*
* BatIO - Abstract input/output
* Copyright (C) 2003 Nicolas Cannasse
* 2008 David Teller (contributor)
@@ -22,7 +22,7 @@
*)
(** High-order abstract I/O.
-
+
This module deals with {!type: input}s and {!type:
output}s. Inputs are manners of getting information from the
outside world and into your program (for instance, reading from
@@ -63,7 +63,7 @@
may wish to force all waiting operations to take place {e now}.
For this purpose, you may either function {!flush} or function
I {!flush_out}.
-
+
Once you have finished using your {!type: input} or your {!type:
output}, chances are that you will want to close it. This is not a
strict necessity, as OCaml will eventually close it for you when
@@ -139,7 +139,7 @@ val stdout: unit output
val stderr: unit output
(** Standard error output, as per Unix/Windows conventions.
-
+
Use this output to display warnings and error messages.
Example: [
@@ -298,7 +298,7 @@ val close_all : unit -> unit
*)
(**/**)
-(** {6 Creation of BatIO Inputs/Outputs}
+(** {6 Creation of BatIO Inputs/Outputs}
To open a file for reading/writing, see {!File.open_file_in}
and {!File.open_file_out}*)
@@ -323,13 +323,13 @@ val output_buffer : Buffer.t -> string output
(** Create an output that will append its results at the end of a buffer
in an efficient way. Closing returns the whole contents of the buffer
-- the buffer remains usable.*)
-
+
val input_enum : char BatEnum.t -> input
(** Create an input that will read from an [enum]. *)
val output_enum : unit -> char BatEnum.t output
-(** Create an output that will write into an [enum]. The
+(** Create an output that will write into an [enum]. The
final enum is returned when the output is closed. *)
val combine : ('a output * 'b output) -> ('a * 'b) output
@@ -349,7 +349,7 @@ val tab_out : ?tab:char -> int -> 'a output -> unit output
*)
(*val repeat: int -> 'a output -> unit output
-(** [repeat n out] create an output in which every character or string is repeated
+(** [repeat n out] create an output in which every character or string is repeated
[n] times to [out].*)*)
(** {6 Utilities} *)
@@ -362,7 +362,7 @@ val read_uall : input -> Ulib.Text.t
val pipe : unit -> input * unit output
(** Create a pipe between an input and an ouput. Data written from
- the output can be read from the input.
+ the output can be read from the input.
*)
val copy : ?buffer:int -> input -> _ output -> unit
@@ -376,7 +376,7 @@ val pos_in : input -> input * (unit -> int)
(** Create an input that provide a count function of the number of bytes
read from it. *)
-val progress_in : input -> (unit -> unit) -> input
+val progress_in : input -> (unit -> unit) -> input
(** [progress_in inp f] create an input that calls [f ()]
whenever some content is succesfully read from it.*)
@@ -389,7 +389,7 @@ val progress_out : 'a output -> (unit -> unit) -> unit output
whenever some content is succesfully written to it.*)
external cast_output : 'a output -> unit output = "%identity"
-(** You can safely transform any output to an unit output in a safe way
+(** You can safely transform any output to an unit output in a safe way
by using this function. *)
@@ -460,7 +460,7 @@ val write_i16 : 'a output -> int -> unit
(** Write a signed 16-bit word. *)
val write_i32 : 'a output -> int -> unit
-(** Write a signed 32-bit integer. *)
+(** Write a signed 32-bit integer. *)
val write_real_i32 : 'a output -> int32 -> unit
(** Write an OCaml int32. *)
@@ -485,7 +485,7 @@ val write_text : _ output -> Ulib.Text.t -> unit
val write_line : 'a output -> string -> unit
(** Write a line and append a line end.
-
+
This adds the correct line end for your operating system. That
is, if you are writing to a file and your system imposes that
files should end lines with character LF (or ['\n']), as Unix,
@@ -505,7 +505,7 @@ sig
Generally, to use this module you will wish to either open both
{!BatIO} and {!BigEndian}, so as to import a big-endian version of
{!BatIO}, as per
- [open System.BatIO, BigEndian in ...],
+ [open System.BatIO, BigEndian in ...],
or to redefine locally {!BatIO} to use big-endian encodings
[module BatIO = System.BatIO include BigEndian]
@@ -541,7 +541,7 @@ sig
(** Write a signed 16-bit word. *)
val write_i32 : 'a output -> int -> unit
- (** Write a signed 32-bit integer. *)
+ (** Write a signed 32-bit integer. *)
val write_real_i32 : 'a output -> int32 -> unit
(** Write an OCaml int32. *)
@@ -584,7 +584,7 @@ sig
(** Write an enumeration of signed 16-bit words. *)
val write_i32s : 'a output -> int BatEnum.t -> unit
- (** Write an enumeration of signed 32-bit integers. *)
+ (** Write an enumeration of signed 32-bit integers. *)
val write_real_i32s : 'a output -> int32 BatEnum.t -> unit
(** Write an enumeration of OCaml int32s. *)
@@ -636,9 +636,9 @@ val drop_bits : in_bits -> unit
val create_in :
read:(unit -> char) ->
- input:(string -> int -> int -> int) ->
+ input:(string -> int -> int -> int) ->
close:(unit -> unit) -> input
-(** Fully create an input by giving all the needed functions.
+(** Fully create an input by giving all the needed functions.
{b Note} Do {e not} use this function for creating an input
which reads from one or more underlying inputs. Rather, use
@@ -647,26 +647,26 @@ val create_in :
val wrap_in :
read:(unit -> char) ->
- input:(string -> int -> int -> int) ->
- close:(unit -> unit) ->
+ input:(string -> int -> int -> int) ->
+ close:(unit -> unit) ->
underlying:(input list) ->
input
-(** Fully create an input reading from other inputs by giving all
- the needed functions.
+(** Fully create an input reading from other inputs by giving all
+ the needed functions.
This function is a more general version of {!create_in}
which also handles dependency management between inputs.
{b Note} When you create an input which reads from another
- input, function [close] should {e not} close the inputs of
+ input, function [close] should {e not} close the inputs of
[underlying]. Doing so is a common error, which could result
in inadvertently closing {!stdin} or a network socket, etc.
*)
val inherit_in:
?read:(unit -> char) ->
- ?input:(string -> int -> int -> int) ->
- ?close:(unit -> unit) ->
+ ?input:(string -> int -> int -> int) ->
+ ?close:(unit -> unit) ->
input -> input
(** Simplified and optimized version of {!wrap_in} which may be used
whenever only one input appears as dependency.
@@ -681,11 +681,11 @@ val inherit_in:
val create_out :
write:(char -> unit) ->
- output:(string -> int -> int -> int) ->
- flush:(unit -> unit) ->
- close:(unit -> 'a) ->
+ output:(string -> int -> int -> int) ->
+ flush:(unit -> unit) ->
+ close:(unit -> 'a) ->
'a output
- (**
+ (**
Fully create an output by giving all the needed functions.
@param write Write one character to the output (see {!write}).
@@ -700,10 +700,10 @@ val create_out :
val wrap_out :
write:(char -> unit) ->
- output:(string -> int -> int -> int) ->
- flush:(unit -> unit) ->
- close:(unit -> 'a) ->
- underlying:('b output list) ->
+ output:(string -> int -> int -> int) ->
+ flush:(unit -> unit) ->
+ close:(unit -> 'a) ->
+ underlying:('b output list) ->
'a output
(**
Fully create an output that writes to one or more underlying outputs.
@@ -751,9 +751,9 @@ val wrap_out :
val inherit_out:
?write:(char -> unit) ->
- ?output:(string -> int -> int -> int) ->
+ ?output:(string -> int -> int -> int) ->
?flush:(unit -> unit) ->
- ?close:(unit -> unit) ->
+ ?close:(unit -> unit) ->
'a output -> unit output
(**
Simplified and optimized version of {!wrap_out} whenever only
@@ -771,7 +771,7 @@ val inherit_out:
*)
val input_channel : ?autoclose:bool -> ?cleanup:bool -> in_channel -> input
-(** Create an input that will read from a channel.
+(** Create an input that will read from a channel.
@param autoclose If true or unspecified, the {!type: input}
will be automatically closed when the underlying [in_channel]
@@ -783,12 +783,12 @@ val input_channel : ?autoclose:bool -> ?cleanup:bool -> in_channel -> input
*)
val output_channel : ?cleanup:bool -> out_channel -> unit output
-(** Create an output that will write into a channel.
+(** Create an output that will write into a channel.
@param cleanup If true, the channel
will be automatically closed when the {!type: output} is closed.
Otherwise, you will need to close the channel manually.
-*)
+*)
val to_input_channel : input -> in_channel
@@ -808,7 +808,7 @@ val to_input_channel : input -> in_channel
[poly_in_channel] and/or [poly_out_channel] which are the common
BatIO specifications established for ExtLib, OCamlNet and
Camomile.
-
+
(see http://www.ocaml-programming.de/tmp/BatIO-Classes.html for more details).
{b Note} In this version of Batteries Included, the object wrappers are {e not}
@@ -878,7 +878,7 @@ val strings_of : input -> string BatEnum.t
val lines_of : input -> string BatEnum.t
(** Read an enumeration of LF or CRLF terminated strings. *)
-
+
val chunks_of : int -> input -> string BatEnum.t
(** Read an input as an enumeration of strings of given length. If the input isn't a multiple of that length, the final string will be smaller than the rest. *)
@@ -886,7 +886,7 @@ val ulines_of : input -> Ulib.Text.t BatEnum.t
(** offer the lines of a UTF-8 encoded input as an enumeration*)
val chars_of : input -> char BatEnum.t
-(** Read an enumeration of Latin-1 characters.
+(** Read an enumeration of Latin-1 characters.
{b Note} Usually faster than calling [read] several times.*)
@@ -912,7 +912,7 @@ val write_i16s : 'a output -> int BatEnum.t -> unit
(** Write an enumeration of signed 16-bit words. *)
val write_i32s : 'a output -> int BatEnum.t -> unit
-(** Write an enumeration of signed 32-bit integers. *)
+(** Write an enumeration of signed 32-bit integers. *)
val write_real_i32s : 'a output -> int32 BatEnum.t -> unit
(** Write an enumeration of OCaml int32s. *)
View
90 src/batInnerIO.mli
@@ -1,4 +1,4 @@
-(*
+(*
* BatInnerIO - Abstract input/output (inner module)
* Copyright (C) 2003 Nicolas Cannasse
* 2008 David Teller
@@ -27,7 +27,7 @@
This module contains the core definitions of {!BatIO}, so as to avoid circular
dependencies between modules which only need simple functions of {!BatIO} and
that module itself.
-
+
Don't use this module, use {!BatIO}.
@author Nicolas Cannasse
@@ -144,9 +144,9 @@ val on_close_out : 'a output -> ('a output -> unit) -> unit
val create_in :
read:(unit -> char) ->
- input:(string -> int -> int -> int) ->
+ input:(string -> int -> int -> int) ->
close:(unit -> unit) -> input
-(** Fully create an input by giving all the needed functions.
+(** Fully create an input by giving all the needed functions.
{b Note} Do {e not} use this function for creating an input
which reads from one or more underlying inputs. Rather, use
@@ -155,8 +155,8 @@ val create_in :
val inherit_in:
?read:(unit -> char) ->
- ?input:(string -> int -> int -> int) ->
- ?close:(unit -> unit) ->
+ ?input:(string -> int -> int -> int) ->
+ ?close:(unit -> unit) ->
input -> input
(**
Simplified and optimized version of {!wrap_in} whenever only
@@ -166,11 +166,11 @@ val inherit_in:
val wrap_in :
read:(unit -> char) ->
- input:(string -> int -> int -> int) ->
- close:(unit -> unit) ->
+ input:(string -> int -> int -> int) ->
+ close:(unit -> unit) ->
underlying:(input list) ->
input
-(** Fully create an input reading from other inputs by giving all the needed functions.
+(** Fully create an input reading from other inputs by giving all the needed functions.
This function is a more general version of {!create_in}
which also handles dependency management between inputs.
@@ -181,11 +181,11 @@ val wrap_in :
val create_out :
write:(char -> unit) ->
- output:(string -> int -> int -> int) ->
- flush:(unit -> unit) ->
- close:(unit -> 'a) ->
+ output:(string -> int -> int -> int) ->
+ flush:(unit -> unit) ->
+ close:(unit -> 'a) ->
'a output
-(**
+(**
Fully create an output by giving all the needed functions.
@param write Write one character to the output (see {!write}).
@@ -200,9 +200,9 @@ val create_out :
val inherit_out:
?write:(char -> unit) ->
- ?output:(string -> int -> int -> int) ->
+ ?output:(string -> int -> int -> int) ->
?flush:(unit -> unit) ->
- ?close:(unit -> unit) ->
+ ?close:(unit -> unit) ->
_ output -> unit output
(**
Simplified and optimized version of {!wrap_out} whenever only
@@ -212,10 +212,10 @@ val inherit_out:
val wrap_out :
write:(char -> unit) ->
- output:(string -> int -> int -> int) ->
- flush:(unit -> unit) ->
- close:(unit -> 'a) ->
- underlying:('b output list) ->
+ output:(string -> int -> int -> int) ->
+ flush:(unit -> unit) ->
+ close:(unit -> 'a) ->
+ underlying:('b output list) ->
'a output
(**
Fully create an output that writes to one or more underlying outputs.
@@ -321,7 +321,7 @@ val write_i16 : 'a output -> int -> unit
(** Write a signed 16-bit word. *)
val write_i32 : 'a output -> int -> unit
-(** Write a signed 32-bit integer. *)
+(** Write a signed 32-bit integer. *)
val write_real_i32 : 'a output -> int32 -> unit
(** Write an OCaml int32. *)
@@ -343,7 +343,7 @@ val write_line : 'a output -> string -> unit
to CRLF on some systems depending on the underlying BatIO). *)
external cast_output : 'a output -> unit output = "%identity"
-(** You can safely transform any output to an unit output in a safe way
+(** You can safely transform any output to an unit output in a safe way
by using this function. *)
(**
@@ -351,7 +351,7 @@ external cast_output : 'a output -> unit output = "%identity"
*)
val input_channel : ?autoclose:bool -> ?cleanup:bool -> in_channel -> input
-(** Create an input that will read from a channel.
+(** Create an input that will read from a channel.
@param autoclose If true or unspecified, the {!type: input}
will be automatically closed when the underlying [in_channel]
@@ -363,12 +363,12 @@ val input_channel : ?autoclose:bool -> ?cleanup:bool -> in_channel -> input
*)
val output_channel : ?cleanup:bool -> out_channel -> unit output
-(** Create an output that will write into a channel.
+(** Create an output that will write into a channel.
@param cleanup If true, the channel
will be automatically closed when the {!type: output} is closed.
Otherwise, you will need to close the channel manually.
-*)
+*)
(*
val to_input_channel : input -> in_channel
(** Create a channel that will read from an input.
@@ -398,7 +398,7 @@ val stdout: unit output
val stderr: unit output
(** Standard error output, as per Unix/Windows conventions.
-
+
Use this output to display warnings and error messages.
*)
@@ -455,7 +455,7 @@ module Printf : sig
(**
{6 General overview}
-
+
The functions of this module produce output according to a
{!Pervasives.format}, as described below. Some functions write to
the standard output (i.e. the screen), some to error channels,
@@ -493,13 +493,13 @@ module Printf : sig
Note that [\n] (the newline character) and [\t] (the tabulation)
are not specific to this module but rather part of the conventions
on characters strings in OCaml.
-
+
Other directives and functions make this module extremely useful
for printing, pretty-printing and translation of messages to
the user's language. For more information, see the documentation
of {!format} and the various functions.*)
-
+
(**
{6 Formats}
@@ -508,7 +508,7 @@ module Printf : sig
type ('a, 'b, 'c) t = ('a, 'b, 'c) Pervasives.format
(**
The format to use for displaying the various arguments passed to the function.
-
+
Syntactically, the format is a character string which contains two types
of objects: plain characters, which are simply copied, and directives,
each of which causes the conversion and printing of arguments.
@@ -620,11 +620,11 @@ type ('a, 'b, 'c) t = ('a, 'b, 'c) Pervasives.format
val printf: ('b, 'a output, unit) t -> 'b
(**The usual [printf] function, prints to the standard output {!stdout}, i.e. normally
to the screen. If you are lost, this is probably the function you're looking for.*)
-
+
val eprintf: ('b, 'a output, unit) t -> 'b
(**The usual [eprintf] function, prints to the standard error output {!stderr}, used
to display warnings and errors. Otherwise identical to {!printf}.*)
-
+
val sprintf: ('a, unit, string) t -> 'a
(** A function which doesn't print its result but returns it as a string. Useful
for building messages, for translation purposes or for display in a window,
@@ -636,7 +636,7 @@ val sprintf: ('a, unit, string) t -> 'a
Note that any function called with [%a] should return strings, i.e.
should have type [unit -> string].*)
-
+
val sprintf2: ('a, 'b output, unit, string) format4 -> 'a
(** A function which doesn't print its result but returns it as a string. Useful
for building messages, for translation purposes or for display in a window,
@@ -648,7 +648,7 @@ val sprintf2: ('a, 'b output, unit, string) format4 -> 'a
Note that any function called with [%a] should be able to print its result,
i.e. should have type ['b output -> unit].*)
-
+
(** {6 General functions}*)
val fprintf: 'a output -> ('b, 'a output, unit) t -> 'b
@@ -667,30 +667,30 @@ val fprintf: 'a output -> ('b, 'a output, unit) t -> 'b
val ifprintf: _ -> ('b, 'a output, unit) t -> 'b
(**As {!fprintf} but doesn't actually print anything.
Sometimes useful for debugging.*)
-
+
val bprintf: Buffer.t -> ('a, Buffer.t, unit) t -> 'a
(**As {!fprintf}, but with buffers instead of outputs.
In particular, any unparser called with [%a] should
write to a buffer rather than to an output*)
-
+
val bprintf2: Buffer.t -> ('b, 'a output, unit) t -> 'b
(**As {!printf} but writes to a buffer instead
of printing to the output. By opposition to
{!bprintf}, only the result is changed with
respect to {!printf}, not the inner workings.*)
-
+
(**{6 Functions with continuations}*)
val kfprintf : ('a output -> 'b) -> 'a output -> ('c, 'a output, unit, 'b) format4 -> 'c
(**Same as [fprintf], but instead of returning immediately, passes the [output] to its first
argument at the end of printing.*)
-
+
val ksprintf: (string -> 'a) -> ('b, unit, string, 'a) format4 -> 'b
(** Same as [sprintf] above, but instead of returning the string,
passes it to the first argument. *)
val ksprintf2: (string -> 'b) -> ('c, 'a output, unit, 'b) format4 -> 'c
(** Same as [sprintf2] above, but instead of returning the string,
passes it to the first argument. *)
-
+
val kbprintf : (Buffer.t -> 'a) ->
Buffer.t -> ('b, Buffer.t, unit, 'a) format4 -> 'b
(** Same as [bprintf], but instead of returning immediately,
@@ -698,17 +698,17 @@ val kbprintf : (Buffer.t -> 'a) ->
val kbprintf2 : (Buffer.t -> 'b) -> Buffer.t -> ('c, 'a output, unit, 'b) format4 -> 'c
(** Same as [bprintf2], but instead of returning immediately,
passes the buffer to its first argument at the end of printing.*)
-
+
val kprintf : (string -> 'a) -> ('b, unit, string, 'a) format4 -> 'b
(** @deprecated This is a deprecated synonym for [ksprintf]. *)
-
+
(**
{6 About formats}
-
+
You only need to read this if you intend to create your new printf-like functions,
which happens generally by toying with {!mkprintf}.
-
+
{7 Format4}
@@ -723,9 +723,9 @@ val kprintf : (string -> 'a) -> ('b, unit, string, 'a) format4 -> 'b
- ['b] is the type of the first argument given to unparsers
(i.e. functions introduced with [%a] or [%t])
{ul
- {- if your unparsers take a [unit] argument, ['b] should be
+ {- if your unparsers take a [unit] argument, ['b] should be
[unit]}
- {- if your unparsers take a [string output], ['b] should be
+ {- if your unparsers take a [string output], ['b] should be
[string output]}
{- ...}
}
@@ -742,7 +742,7 @@ val kprintf : (string -> 'a) -> ('b, unit, string, 'a) format4 -> 'b
{7 Format}
[('a, 'b, 'c) format] or [('a, 'b, 'c) t] is just a shortcut for [('a, 'b, 'c, 'c) format4].
-
+
{7 Important}
Note that {!Obj.magic} is involved behind this, so be careful.
*)
View
6 src/batLexing.mli
@@ -2,7 +2,7 @@
* BatLexing - Additional functions for string manipulations.
* Copyright (C) 1996 Xavier Leroy, INRIA Rocquencourt
* Copyright (C) 2009 David Teller, LIFO, Universite d'Orleans
- *
+ *
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
* License as published by the Free Software Foundation; either
@@ -19,13 +19,13 @@
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*)
open Lexing
-(** Simple lexing using ocaml conventions
+(** Simple lexing using ocaml conventions
This module extends Stdlib's
{{:http://caml.inria.fr/pub/docs/manual-ocaml/libref/Lexing.html}Lexing}
module, go there for documentation on the rest of the functions
and types.
-
+
*)
View
10 src/batLog.mli
@@ -1,7 +1,7 @@
-(*
+(*
* BatLog - Simple Logging module
* Copyright (C) 2011 The Batteries Included Team
- *
+ *
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
* License as published by the Free Software Foundation; either
@@ -18,7 +18,7 @@
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*)
-(** Simple logging
+(** Simple logging
@author Edgar Friendly
*)
open BatIO
@@ -36,7 +36,7 @@ val set_prefix : string -> unit
(** Get and set the output flags. These flags control how the log
messages are output. The default is [`Date; `Time] and log
messages are printed as:
-
+
2011/0628 01:23:45: prefixmessage
*)
type flag = [
@@ -45,7 +45,7 @@ type flag = [
| `Filepos (* Print the file and position of this log command (UNIMPLEMENTED) *)
]
val get_flags : unit -> flag list
-val set_flags : flag list -> unit
+val set_flags : flag list -> unit
val print : ?fp:string -> string -> unit
(** [print s] logs the message s, returning unit. *)
View
8 src/batMarshal.mli
@@ -1,5 +1,5 @@
-(*
- * ExtMarshal - Extended marshaling operations
+(*
+ * ExtMarshal - Extended marshaling operations
* Copyright (C) 1997 Xavier Leroy
* 2008 David Teller
*
@@ -55,7 +55,7 @@
{{:http://caml.inria.fr/pub/docs/manual-ocaml/libref/Marshal.html}Marshal}
module, go there for documentation on the rest of the functions
and types.
-
+
@author Xavier Leroy (base module)
@author David Teller
*)
@@ -63,7 +63,7 @@
open Marshal
val output: _ BatInnerIO.output -> ?sharing:bool -> ?closures:bool -> 'a -> unit
- (** [output out v] writes the representation of [v] on [chan].
+ (** [output out v] writes the representation of [v] on [chan].
@param sharing If [true] (default value), circularities
and sharing inside the value [v] are detected and preserved
View
8 src/batMultiPMap.mli
@@ -19,7 +19,7 @@
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*)
-(**
+(**
Polymorphic Multi-Map.
This is a polymorphic multi-map, i.e. an association from 1 to many.
@@ -114,7 +114,7 @@ end
(** {6 Boilerplate code}*)
(** {7 Printing}*)
-
-val print : ?first:string -> ?last:string -> ?sep:string -> ('a BatInnerIO.output -> 'b -> unit) ->
- ('a BatInnerIO.output -> 'c -> unit) ->
+
+val print : ?first:string -> ?last:string -> ?sep:string -> ('a BatInnerIO.output -> 'b -> unit) ->
+ ('a BatInnerIO.output -> 'c -> unit) ->
'a BatInnerIO.output -> ('b, 'c) t -> unit
View
2  src/batMutex.mli
@@ -3,7 +3,7 @@
* Copyright (C) 1996 Xavier Leroy
* 1996 Damien Doligez
* 2009 David Rajchenbach-Teller, LIFO, Universite d'Orleans
- *
+ *
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
* License as published by the Free Software Foundation; either
View
34 src/batNum.mli
@@ -22,10 +22,10 @@
(** Operation on arbitrary-precision numbers.
-
+
Numbers (type {!num}) are arbitrary-precision rational numbers,
- plus the special elements [1/0] (infinity) and [0/0] (undefined).
-
+ plus the special elements [1/0] (infinity) and [0/0] (undefined).
+
@author Valerie Menissier-Morain (base module)
@author Gabriel Scherer
@author David Teller
@@ -41,7 +41,7 @@
type num = Num.num =
Int of int
| Big_int of big_int
- | Ratio of ratio
+ | Ratio of ratio
type t = num
@@ -105,10 +105,10 @@
val operations : num BatNumber.numeric
-
+
(** {6 Comparisons between numbers} *)
-
+
val ( =/ ) : num -> num -> bool
val ( </ ) : num -> num -> bool
val ( >/ ) : num -> num -> bool
@@ -120,19 +120,19 @@
val le_num : num -> num -> bool
val gt_num : num -> num -> bool
val ge_num : num -> num -> bool
-
-
-
+
+
+
(** {6 Coercions with strings} *)
-
-
+
+
val approx_num_fix : int -> num -> string
(** See {!Num.approx_num_exp}.*)
-
+
val approx_num_exp : int -> num -> string
(** Approximate a number by a decimal. The first argument is the
required precision. The second argument is the number to
@@ -140,7 +140,7 @@
argument is the number of digits after the decimal point.
[approx_num_exp] uses scientific (exponential) notation; the
first argument is the number of digits in the mantissa. *)
-
+
(** {6 Coercions between numerical types} *)
@@ -181,17 +181,17 @@
(**/**)
(** {6 Deprecated} *)
-
+
val ( +/ ) : num -> num -> num
val add_num : num -> num -> num
val minus_num : num -> num
val ( -/ ) : num -> num -> num
val sub_num : num -> num -> num
val ( */ ) : num -> num -> num
- val mult_num : num -> num -> num
+ val mult_num : num -> num -> num
val square_num : num -> num
val ( // ) : num -> num -> num
- val div_num : num -> num -> num
+ val div_num : num -> num -> num
val quo_num : num -> num -> num
val mod_num : num -> num -> num
val ( **/ ) : num -> num -> num
@@ -202,7 +202,7 @@
val incr_num : num ref -> unit
val decr_num : num ref -> unit
val is_integer_num : num -> bool
-
+
val integer_num : num -> num
val floor_num : num -> num
val round_num : num -> num
View
34 src/batOo.mli
@@ -1,8 +1,8 @@
-(*
+(*
* ExtOO - Extended operations on objects
* Copyright (C) 1996 Jerome Vouillon, INRIA
* 2008 David Teller, LIFO, Universite d'Orleans
- *
+ *
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
* License as published by the Free Software Foundation; either
@@ -19,7 +19,7 @@
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*)
-(** Operations on objects
+(** Operations on objects
@documents Oo
@author Jerome Vouillon (Base module)
@@ -31,7 +31,7 @@ sig
val copy : (< .. > as 'a) -> 'a
(** [Oo.copy o] returns a copy of object [o], that is a fresh
object with the same methods and instance variables as [o] *)
-
+
external id : < .. > -> int = "%field1"
(** Return an integer identifying this object, unique for
the current execution of the program. *)
@@ -49,7 +49,7 @@ sig
(** Run-time support for objects and classes.
All functions in this module are for system use only, not for the
- casual user.
+ casual user.
@documents CamlinternalOO
*)
@@ -94,9 +94,9 @@ sig
val dummy_class :
string * int * int ->
(t * (table -> Obj.t -> t) * (Obj.t -> t) * Obj.t)
-
+
(** {6 Objects} *)
-
+
val copy : (< .. > as 'a) -> 'a
val create_object : table -> obj
val create_object_opt : obj -> table -> obj
@@ -108,14 +108,14 @@ sig
external sendself : obj -> label -> t = "%sendself"
external get_public_method : obj -> tag -> closure
= "caml_get_public_method" "noalloc"
-
+
(** {6 Table cache} *)
-
+
type tables = CamlinternalOO.tables
val lookup_tables : tables -> closure array -> tables
(** {6 Builtins to reduce code size} *)
-
+
(*
val get_const : t -> closure
val get_var : int -> closure
@@ -142,7 +142,7 @@ sig
val send_env : tag -> int -> int -> int -> closure
val send_meth : tag -> label -> int -> closure
*)
-
+
type impl = CamlinternalOO.impl =
GetConst
| GetVar
@@ -169,9 +169,9 @@ sig
| SendEnv
| SendMeth
| Closure of closure
-
+
(** {6 Parameters} *)
-
+
(** currently disabled *)
type params = CamlinternalOO.params =
{ mutable compact_table : bool;
@@ -179,17 +179,17 @@ sig
mutable clean_when_copying : bool;
mutable retry_count : int;
mutable bucket_small_size : int }
-
+
val params : params
-
+
(** {6 Statistics} *)
-
+
type stats = CamlinternalOO.stats =
{ classes : int;
methods : int;
inst_vars : int }
val stats : unit -> stats
-
+
end
end
View
8 src/batParserCo.mli
@@ -1,4 +1,4 @@
-(*
+(*
* ParserCo - A simple monadic parser combinator library
* Copyright (C) 2008 David Teller
*
@@ -48,7 +48,7 @@
*)
type 'a state =
| Eof (**The end of the source has been reached.*)
- | State of 'a
+ | State of 'a
type 'a report = Report of ('a state * string * 'a report) list
(**The final result of parsing*)
@@ -73,7 +73,7 @@ end
(** {6 Primitives} *)
type ('a, 'b, 'c) t
- (**A parser for elements of type ['a], producing
+ (**A parser for elements of type ['a], producing
elements of type ['b], with user-defined states
of type ['c].*)
@@ -125,7 +125,7 @@ val ( >::) : ('a, 'b, 'c) t -> ('a, 'b list, 'c) t -> ('a, 'b list, 'c) t
val label: string -> ('a, 'b, 'c) t -> ('a, 'b, 'c) t
(**Give a name to a parser, for debugging purposes.*)
-val state: (_, 'b state, 'b) t
+val state: (_, 'b state, 'b) t
(**Succeed and return the state of the parser*)
val any: ('a, 'a, _) t
View
42 src/batPrintf.mli
@@ -1,4 +1,4 @@
-(*
+(*
* ExtPrintf - Extended Printf module
* Copyright (C) 2008 David Teller
*
@@ -39,7 +39,7 @@ open BatInnerIO
only module {!Print} will be updated and maintained.
{6 General overview}
-
+
The functions of this module produce output according to a
{!Pervasives.format}, as described below. Some functions write to
the standard output (i.e. the screen), some to error channels,
@@ -77,13 +77,13 @@ open BatInnerIO
Note that [\n] (the newline character) and [\t] (the tabulation)
are not specific to this module but rather part of the conventions
on characters strings in OCaml.
-
+
Other directives and functions make this module extremely useful
for printing, pretty-printing and translation of messages to
the user's language. For more information, see the documentation
of {!format} and the various functions.*)
-
+
(**
{6 Formats}
@@ -92,7 +92,7 @@ open BatInnerIO
type ('a, 'b, 'c) t = ('a, 'b, 'c) Pervasives.format
(**
The format to use for displaying the various arguments passed to the function.
-
+
Syntactically, the format is a character string which contains two types
of objects: plain characters, which are simply copied, and directives,
each of which causes the conversion and printing of arguments.
@@ -205,11 +205,11 @@ type ('a, 'b, 'c) t = ('a, 'b, 'c) Pervasives.format
val printf: ('b, 'a output, unit) t -> 'b
(**The usual [printf] function, prints to the standard output {!stdout}, i.e. normally
to the screen. If you are lost, this is probably the function you're looking for.*)
-
+
val eprintf: ('b, 'a output, unit) t -> 'b
(**The usual [eprintf] function, prints to the standard error output {!stderr}, used
to display warnings and errors. Otherwise identical to {!printf}.*)
-
+
val sprintf: ('a, unit, string) t -> 'a
(** A function which doesn't print its result but returns it as a string. Useful
for building messages, for translation purposes or for display in a window,
@@ -221,7 +221,7 @@ val sprintf: ('a, unit, string) t -> 'a
Note that any function called with [%a] should return strings, i.e.
should have type [unit -> string].*)
-
+
val sprintf2: ('a, 'b output, unit, string) format4 -> 'a
(** A function which doesn't print its result but returns it as a string. Useful
for building messages, for translation purposes or for display in a window,
@@ -233,7 +233,7 @@ val sprintf2: ('a, 'b output, unit, string) format4 -> 'a
Note that any function called with [%a] should be able to print its result,
i.e. should have type ['b output -> unit].*)
-
+
(** {6 General functions}*)
val fprintf: 'a output -> ('b, 'a output, unit) t -> 'b
@@ -252,31 +252,31 @@ val fprintf: 'a output -> ('b, 'a output, unit) t -> 'b
val ifprintf: _ -> ('b, 'a output, unit) t -> 'b
(**As {!fprintf} but doesn't actually print anything.
Sometimes useful for debugging.*)
-
+
val bprintf: Buffer.t -> ('a, Buffer.t, unit) t -> 'a
(**As {!fprintf}, but with buffers instead of outputs.
In particular, any unparser called with [%a] should
write to a buffer rather than to an output*)
-
+
val bprintf2: Buffer.t -> ('b, 'a output, unit) t -> 'b
(**As {!printf} but writes to a buffer instead
of printing to the output. By opposition to
{!bprintf}, only the result is changed with
respect to {!printf}, not the inner workings.*)
-
+
(**{6 Functions with continuations}*)
val kfprintf : ('a output -> 'b) -> 'a output -> ('c, 'a output, unit, 'b) format4 -> 'c
(**Same as [fprintf], but instead of returning immediately, passes the [output] to its first
argument at the end of printing.*)
-
+
val ksprintf: (string -> 'a) -> ('b, unit, string, 'a) format4 -> 'b
(** Same as [sprintf] above, but instead of returning the string,
passes it to the first argument. *)
val ksprintf2: (string -> 'b) -> ('c, 'a output, unit, 'b) format4 -> 'c
(** Same as [sprintf2] above, but instead of returning the string,
passes it to the first argument. *)
-
+
val kbprintf : (Buffer.t -> 'a) ->
Buffer.t -> ('b, Buffer.t, unit, 'a) format4 -> 'b
(** Same as [bprintf], but instead of returning immediately,
@@ -284,17 +284,17 @@ val kbprintf : (Buffer.t -> 'a) ->
val kbprintf2 : (Buffer.t -> 'b) -> Buffer.t -> ('c, 'a output, unit, 'b) format4 -> 'c
(** Same as [bprintf2], but instead of returning immediately,