1Stdlib(3)                        OCaml library                       Stdlib(3)
2
3
4

NAME

6       Stdlib - The OCaml Standard library.
7

Module

9       Module   Stdlib
10

Documentation

12       Module Stdlib
13        : sig end
14
15
16       The OCaml Standard library.
17
18       This  module  is automatically opened at the beginning of each compila‐
19       tion. All components of this module can therefore be referred by  their
20       short name, without prefixing them by Stdlib .
21
22       It particular, it provides the basic operations over the built-in types
23       (numbers, booleans, byte sequences,  strings,  exceptions,  references,
24       lists, arrays, input-output channels, ...) and the modules .
25
26
27
28
29
30
31
32   Exceptions
33       val raise : exn -> 'a
34
35       Raise the given exception value
36
37
38
39       val raise_notrace : exn -> 'a
40
41       A faster version raise which does not record the backtrace.
42
43
44       Since 4.02.0
45
46
47
48       val invalid_arg : string -> 'a
49
50       Raise exception Invalid_argument with the given string.
51
52
53
54       val failwith : string -> 'a
55
56       Raise exception Failure with the given string.
57
58
59
60       exception Exit
61
62
63       The  Exit  exception is not raised by any library function.  It is pro‐
64       vided for use in your programs.
65
66
67
68       exception Match_failure of (string * int * int)
69
70
71       Exception raised when none of the cases of  a  pattern-matching  apply.
72       The  arguments are the location of the match keyword in the source code
73       (file name, line number, column number).
74
75
76
77       exception Assert_failure of (string * int * int)
78
79
80       Exception raised when an assertion fails. The arguments are  the  loca‐
81       tion  of the assert keyword in the source code (file name, line number,
82       column number).
83
84
85
86       exception Invalid_argument of string
87
88
89       Exception raised by library functions to signal that  the  given  argu‐
90       ments  do not make sense. The string gives some information to the pro‐
91       grammer. As a general rule, this exception should  not  be  caught,  it
92       denotes  a  programming  error  and  the code should be modified not to
93       trigger it.
94
95
96
97       exception Failure of string
98
99
100       Exception raised by library functions to signal that they are undefined
101       on the given arguments. The string is meant to give some information to
102       the programmer; you must  not  pattern  match  on  the  string  literal
103       because it may change in future versions (use Failure _ instead).
104
105
106
107       exception Not_found
108
109
110       Exception  raised by search functions when the desired object could not
111       be found.
112
113
114
115       exception Out_of_memory
116
117
118       Exception raised by the garbage collector when  there  is  insufficient
119       memory to complete the computation.
120
121
122
123       exception Stack_overflow
124
125
126       Exception  raised by the bytecode interpreter when the evaluation stack
127       reaches its maximal size. This often indicates infinite or  excessively
128       deep  recursion  in  the  user's program. (Not fully implemented by the
129       native-code compiler.)
130
131
132
133       exception Sys_error of string
134
135
136       Exception raised by the input/output functions to report  an  operating
137       system  error. The string is meant to give some information to the pro‐
138       grammer; you must not pattern match on the string  literal  because  it
139       may change in future versions (use Sys_error _ instead).
140
141
142
143       exception End_of_file
144
145
146       Exception  raised by input functions to signal that the end of file has
147       been reached.
148
149
150
151       exception Division_by_zero
152
153
154       Exception raised by integer  division  and  remainder  operations  when
155       their second argument is zero.
156
157
158
159       exception Sys_blocked_io
160
161
162       A  special  case  of  Sys_error  raised  when  no  I/O is possible on a
163       non-blocking I/O channel.
164
165
166
167       exception Undefined_recursive_module of (string * int * int)
168
169
170       Exception raised when an ill-founded  recursive  module  definition  is
171       evaluated.  The  arguments  are  the  location of the definition in the
172       source code (file name, line number, column number).
173
174
175
176
177   Comparisons
178       val (=) : 'a -> 'a -> bool
179
180
181       e1 = e2 tests for structural equality of e1 and e2  .   Mutable  struc‐
182       tures  (e.g. references and arrays) are equal if and only if their cur‐
183       rent contents are structurally equal, even if the two  mutable  objects
184       are  not  the same physical object.  Equality between functional values
185       raises Invalid_argument .  Equality between cyclic data structures  may
186       not terminate.  Left-associative operator, see Ocaml_operators for more
187       information.
188
189
190
191       val (<>) : 'a -> 'a -> bool
192
193       Negation of (=) .  Left-associative operator, see  Ocaml_operators  for
194       more information.
195
196
197
198       val (<) : 'a -> 'a -> bool
199
200       See  (>=)  .   Left-associative  operator, see Ocaml_operators for more
201       information.
202
203
204
205       val (>) : 'a -> 'a -> bool
206
207       See (>=) .  Left-associative operator,  see  Ocaml_operators  for  more
208       information.
209
210
211
212       val (<=) : 'a -> 'a -> bool
213
214       See  (>=)  .   Left-associative operator,  see Ocaml_operators for more
215       information.
216
217
218
219       val (>=) : 'a -> 'a -> bool
220
221       Structural ordering functions. These functions coincide with the  usual
222       orderings over integers, characters, strings, byte sequences and float‐
223       ing-point numbers, and extend them to a total ordering over all  types.
224       The ordering is compatible with ( = ) . As in the case of ( = ) , muta‐
225       ble structures are compared by contents.  Comparison between functional
226       values  raises Invalid_argument .  Comparison between cyclic structures
227       may not terminate.  Left-associative operator, see Ocaml_operators  for
228       more information.
229
230
231
232       val compare : 'a -> 'a -> int
233
234
235       compare  x  y returns 0 if x is equal to y , a negative integer if x is
236       less than y , and a positive integer if x is  greater  than  y  .   The
237       ordering implemented by compare is compatible with the comparison pred‐
238       icates = , < and > defined above,  with one difference on the treatment
239       of  the  float value nan .  Namely, the comparison predicates treat nan
240       as different from any other float value, including itself;  while  com‐
241       pare treats nan as equal to itself and less than any other float value.
242       This treatment of nan ensures that compare  defines  a  total  ordering
243       relation.
244
245
246       compare applied to functional values may raise Invalid_argument .  com‐
247       pare applied to cyclic structures may not terminate.
248
249       The compare function can be used as the comparison function required by
250       the  Set.Make  and  Map.Make  functors,  as  well  as the List.sort and
251       Array.sort functions.
252
253
254
255       val min : 'a -> 'a -> 'a
256
257       Return the smaller of the two arguments.  The result is unspecified  if
258       one of the arguments contains the float value nan .
259
260
261
262       val max : 'a -> 'a -> 'a
263
264       Return  the greater of the two arguments.  The result is unspecified if
265       one of the arguments contains the float value nan .
266
267
268
269       val (==) : 'a -> 'a -> bool
270
271
272       e1 == e2 tests for physical equality of e1 and e2 .  On  mutable  types
273       such as references, arrays, byte sequences, records with mutable fields
274       and objects with mutable instance variables, e1 == e2 is  true  if  and
275       only  if  physical modification of e1 also affects e2 .  On non-mutable
276       types, the behavior of ( == ) is implementation-dependent; however,  it
277       is  guaranteed that e1 == e2 implies compare e1 e2 = 0 .  Left-associa‐
278       tive operator,  see Ocaml_operators for more information.
279
280
281
282       val (!=) : 'a -> 'a -> bool
283
284       Negation of (==) .  Left-associative operator,  see Ocaml_operators for
285       more information.
286
287
288
289
290   Boolean operations
291       val not : bool -> bool
292
293       The boolean negation.
294
295
296
297       val (&&) : bool -> bool -> bool
298
299       The boolean 'and'. Evaluation is sequential, left-to-right: in e1 && e2
300       , e1 is evaluated first, and if it returns false , e2 is not  evaluated
301       at  all.   Right-associative  operator,   see  Ocaml_operators for more
302       information.
303
304
305
306       val (&) : bool -> bool -> bool
307
308       Deprecated.
309
310       (&&)  should  be  used  instead.    Right-associative   operator,   see
311       Ocaml_operators for more information.
312
313
314
315       val (||) : bool -> bool -> bool
316
317       The  boolean 'or'. Evaluation is sequential, left-to-right: in e1 || e2
318       , e1 is evaluated first, and if it returns true , e2 is  not  evaluated
319       at  all.   Right-associative  operator,   see  Ocaml_operators for more
320       information.
321
322
323
324       val (or) : bool -> bool -> bool
325
326       Deprecated.
327
328       (||)  should  be  used  instead.    Right-associative   operator,   see
329       Ocaml_operators for more information.
330
331
332
333
334   Debugging
335       val __LOC__ : string
336
337
338       __LOC__  returns  the  location at which this expression appears in the
339       file currently being parsed by the compiler, with  the  standard  error
340       format of OCaml: "File %S, line %d, characters %d-%d".
341
342
343       Since 4.02.0
344
345
346
347       val __FILE__ : string
348
349
350       __FILE__  returns  the  name  of the file currently being parsed by the
351       compiler.
352
353
354       Since 4.02.0
355
356
357
358       val __LINE__ : int
359
360
361       __LINE__ returns the line number at which this  expression  appears  in
362       the file currently being parsed by the compiler.
363
364
365       Since 4.02.0
366
367
368
369       val __MODULE__ : string
370
371
372       __MODULE__ returns the module name of the file being parsed by the com‐
373       piler.
374
375
376       Since 4.02.0
377
378
379
380       val __POS__ : string * int * int * int
381
382
383       __POS__ returns a tuple (file,lnum,cnum,enum) ,  corresponding  to  the
384       location  at  which this expression appears in the file currently being
385       parsed by the compiler.  file is the current filename,  lnum  the  line
386       number, cnum the character position in the line and enum the last char‐
387       acter position in the line.
388
389
390       Since 4.02.0
391
392
393
394       val __LOC_OF__ : 'a -> string * 'a
395
396
397       __LOC_OF__ expr returns a pair (loc, expr) where loc is the location of
398       expr in the file currently being parsed by the compiler, with the stan‐
399       dard error format of OCaml: "File %S, line %d, characters %d-%d".
400
401
402       Since 4.02.0
403
404
405
406       val __LINE_OF__ : 'a -> int * 'a
407
408
409       __LINE_OF__ expr returns a pair (line, expr) , where line is  the  line
410       number at which the expression expr appears in the file currently being
411       parsed by the compiler.
412
413
414       Since 4.02.0
415
416
417
418       val __POS_OF__ : 'a -> (string * int * int * int) * 'a
419
420
421       __POS_OF__ expr returns a pair  (loc,expr)  ,  where  loc  is  a  tuple
422       (file,lnum,cnum,enum)  corresponding  to  the  location  at  which  the
423       expression expr appears in the file currently being parsed by the  com‐
424       piler.   file  is  the current filename, lnum the line number, cnum the
425       character position in the line and enum the last character position  in
426       the line.
427
428
429       Since 4.02.0
430
431
432
433
434   Composition operators
435       val (|>) : 'a -> ('a -> 'b) -> 'b
436
437       Reverse-application operator: x |> f |> g is exactly equivalent to g (f
438       (x)) .  Left-associative operator, see Ocaml_operators for more  infor‐
439       mation.
440
441
442       Since 4.01
443
444
445
446       val (@@) : ('a -> 'b) -> 'a -> 'b
447
448       Application  operator: g @@ f @@ x is exactly equivalent to g (f (x)) .
449       Right-associative operator, see Ocaml_operators for more information.
450
451
452       Since 4.01
453
454
455
456
457   Integer arithmetic
458       Integers are Sys.int_size bits wide.  All operations are  taken  modulo
459       2^ Sys.int_size .  They do not fail on overflow.
460
461       val (~-) : int -> int
462
463       Unary  negation. You can also write - e instead of ~- e .  Unary opera‐
464       tor, see Ocaml_operators for more information.
465
466
467
468       val (~+) : int -> int
469
470       Unary addition. You can also write + e instead of ~+ e .  Unary  opera‐
471       tor, see Ocaml_operators for more information.
472
473
474       Since 3.12.0
475
476
477
478       val succ : int -> int
479
480
481       succ x is x + 1 .
482
483
484
485       val pred : int -> int
486
487
488       pred x is x - 1 .
489
490
491
492       val (+) : int -> int -> int
493
494       Integer  addition.   Left-associative operator, see Ocaml_operators for
495       more information.
496
497
498
499       val (-) : int -> int -> int
500
501       Integer subtraction.  Left-associative operator, , see  Ocaml_operators
502       for more information.
503
504
505
506       val ( * ) : int -> int -> int
507
508       Integer multiplication.  Left-associative operator, see Ocaml_operators
509       for more information.
510
511
512
513       val (/) : int -> int -> int
514
515       Integer division.  Raise Division_by_zero if the second argument is  0.
516       Integer  division  rounds  the  real  quotient of its arguments towards
517       zero.  More precisely, if x >= 0 and y > 0 , x  /  y  is  the  greatest
518       integer  less than or equal to the real quotient of x by y .  Moreover,
519       (- x) / y = x / (- y) = - (x / y)  .   Left-associative  operator,  see
520       Ocaml_operators for more information.
521
522
523
524       val (mod) : int -> int -> int
525
526       Integer  remainder.   If y is not zero, the result of x mod y satisfies
527       the following properties: x = (x / y) * y + x mod y and abs(x mod y) <=
528       abs(y) - 1 .  If y = 0 , x mod y raises Division_by_zero .  Note that x
529       mod y is negative only if x < 0 .  Raise Division_by_zero if y is zero.
530       Left-associative operator, see Ocaml_operators for more information.
531
532
533
534       val abs : int -> int
535
536       Return the absolute value of the argument.  Note that this may be nega‐
537       tive if the argument is min_int .
538
539
540
541       val max_int : int
542
543       The greatest representable integer.
544
545
546
547       val min_int : int
548
549       The smallest representable integer.
550
551
552
553
554   Bitwise operations
555       val (land) : int -> int -> int
556
557       Bitwise logical and.  Left-associative  operator,  see  Ocaml_operators
558       for more information.
559
560
561
562       val (lor) : int -> int -> int
563
564       Bitwise logical or.  Left-associative operator, see Ocaml_operators for
565       more information.
566
567
568
569       val (lxor) : int -> int -> int
570
571       Bitwise  logical  exclusive   or.    Left-associative   operator,   see
572       Ocaml_operators for more information.
573
574
575
576       val lnot : int -> int
577
578       Bitwise logical negation.
579
580
581
582       val (lsl) : int -> int -> int
583
584
585       n lsl m shifts n to the left by m bits.  The result is unspecified if m
586       < 0 or m > Sys.int_size .  Right-associative operator, see Ocaml_opera‐
587       tors for more information.
588
589
590
591       val (lsr) : int -> int -> int
592
593
594       n  lsr  m  shifts  n  to the right by m bits.  This is a logical shift:
595       zeroes are inserted regardless of the  sign  of  n  .   The  result  is
596       unspecified if m < 0 or m > Sys.int_size .  Right-associative operator,
597       see Ocaml_operators for more information.
598
599
600
601       val (asr) : int -> int -> int
602
603
604       n asr m shifts n to the right by m bits.  This is an arithmetic  shift:
605       the sign bit of n is replicated.  The result is unspecified if m < 0 or
606       m > Sys.int_size .  Right-associative operator, see Ocaml_operators for
607       more information.
608
609
610
611
612   Floating-point arithmetic
613       OCaml's floating-point numbers follow the IEEE 754 standard, using dou‐
614       ble precision (64 bits) numbers.  Floating-point operations never raise
615       an  exception  on overflow, underflow, division by zero, etc.  Instead,
616       special IEEE numbers are returned as appropriate, such as infinity  for
617       1.0  /.  0.0  , neg_infinity for -1.0 /. 0.0 , and nan ('not a number')
618       for 0.0 /. 0.0 .  These special numbers then propagate  through  float‐
619       ing-point  computations  as  expected: for instance, 1.0 /. infinity is
620       0.0 , and any arithmetic operation with nan as argument returns nan  as
621       result.
622
623       val (~-.)  : float -> float
624
625       Unary negation. You can also write -. e instead of ~-. e .  Unary oper‐
626       ator, see Ocaml_operators for more information.
627
628
629
630       val (~+.)  : float -> float
631
632       Unary addition. You can also write +. e instead of ~+. e .  Unary oper‐
633       ator, see Ocaml_operators for more information.
634
635
636       Since 3.12.0
637
638
639
640       val (+.)  : float -> float -> float
641
642       Floating-point  addition.   Left-associative operator, see Ocaml_opera‐
643       tors for more information.
644
645
646
647       val (-.)  : float -> float -> float
648
649       Floating-point subtraction.  Left-associative operator, see Ocaml_oper‐
650       ators for more information.
651
652
653
654       val ( *. ) : float -> float -> float
655
656       Floating-point    multiplication.    Left-associative   operator,   see
657       Ocaml_operators for more information.
658
659
660
661       val (/.)  : float -> float -> float
662
663       Floating-point division.  Left-associative operator,  see  Ocaml_opera‐
664       tors for more information.
665
666
667
668       val ( ** ) : float -> float -> float
669
670       Exponentiation.   Right-associative  operator,  see Ocaml_operators for
671       more information.
672
673
674
675       val sqrt : float -> float
676
677       Square root.
678
679
680
681       val exp : float -> float
682
683       Exponential.
684
685
686
687       val log : float -> float
688
689       Natural logarithm.
690
691
692
693       val log10 : float -> float
694
695       Base 10 logarithm.
696
697
698
699       val expm1 : float -> float
700
701
702       expm1 x computes exp x -. 1.0  ,  giving  numerically-accurate  results
703       even if x is close to 0.0 .
704
705
706       Since 3.12.0
707
708
709
710       val log1p : float -> float
711
712
713       log1p  x  computes  log(1.0  +.  x) (natural logarithm), giving numeri‐
714       cally-accurate results even if x is close to 0.0 .
715
716
717       Since 3.12.0
718
719
720
721       val cos : float -> float
722
723       Cosine.  Argument is in radians.
724
725
726
727       val sin : float -> float
728
729       Sine.  Argument is in radians.
730
731
732
733       val tan : float -> float
734
735       Tangent.  Argument is in radians.
736
737
738
739       val acos : float -> float
740
741       Arc cosine.  The argument must fall within  the  range  [-1.0,  1.0]  .
742       Result is in radians and is between 0.0 and pi .
743
744
745
746       val asin : float -> float
747
748       Arc  sine.   The  argument  must  fall  within  the range [-1.0, 1.0] .
749       Result is in radians and is between -pi/2 and pi/2 .
750
751
752
753       val atan : float -> float
754
755       Arc tangent.  Result is in radians and is between -pi/2 and pi/2 .
756
757
758
759       val atan2 : float -> float -> float
760
761
762       atan2 y x returns the arc tangent of y /. x .  The signs of x and y are
763       used to determine the quadrant of the result.  Result is in radians and
764       is between -pi and pi .
765
766
767
768       val hypot : float -> float -> float
769
770
771       hypot x y returns sqrt(x *. x + y *. y) , that is, the  length  of  the
772       hypotenuse  of  a  right-angled triangle with sides of length x and y ,
773       or, equivalently, the distance of the point (x,y) to origin.  If one of
774       x or y is infinite, returns infinity even if the other is nan .
775
776
777       Since 4.00.0
778
779
780
781       val cosh : float -> float
782
783       Hyperbolic cosine.  Argument is in radians.
784
785
786
787       val sinh : float -> float
788
789       Hyperbolic sine.  Argument is in radians.
790
791
792
793       val tanh : float -> float
794
795       Hyperbolic tangent.  Argument is in radians.
796
797
798
799       val ceil : float -> float
800
801       Round  above  to  an  integer  value.  ceil f returns the least integer
802       value greater than or equal to f .  The result is returned as a float.
803
804
805
806       val floor : float -> float
807
808       Round below to an integer value.  floor f returns the greatest  integer
809       value less than or equal to f .  The result is returned as a float.
810
811
812
813       val abs_float : float -> float
814
815
816       abs_float f returns the absolute value of f .
817
818
819
820       val copysign : float -> float -> float
821
822
823       copysign  x  y  returns  a  float whose absolute value is that of x and
824       whose sign is that of y .  If x is nan , returns nan .  If y is  nan  ,
825       returns either x or -. x , but it is not specified which.
826
827
828       Since 4.00.0
829
830
831
832       val mod_float : float -> float -> float
833
834
835       mod_float  a  b  returns  the  remainder  of a with respect to b .  The
836       returned value is a -. n *. b , where n is the quotient a /. b  rounded
837       towards zero to an integer.
838
839
840
841       val frexp : float -> float * int
842
843
844       frexp  f  returns  the  pair of the significant and the exponent of f .
845       When f is zero, the significant x and the exponent n of f are equal  to
846       zero.   When f is non-zero, they are defined by f = x *. 2 ** n and 0.5
847       <= x < 1.0 .
848
849
850
851       val ldexp : float -> int -> float
852
853
854       ldexp x n returns x *. 2 ** n .
855
856
857
858       val modf : float -> float * float
859
860
861       modf f returns the pair of the fractional and integral part of f .
862
863
864
865       val float : int -> float
866
867       Same as float_of_int .
868
869
870
871       val float_of_int : int -> float
872
873       Convert an integer to floating-point.
874
875
876
877       val truncate : float -> int
878
879       Same as int_of_float .
880
881
882
883       val int_of_float : float -> int
884
885       Truncate the given floating-point number to an integer.  The result  is
886       unspecified if the argument is nan or falls outside the range of repre‐
887       sentable integers.
888
889
890
891       val infinity : float
892
893       Positive infinity.
894
895
896
897       val neg_infinity : float
898
899       Negative infinity.
900
901
902
903       val nan : float
904
905       A special floating-point value denoting  the  result  of  an  undefined
906       operation  such as 0.0 /. 0.0 .  Stands for 'not a number'.  Any float‐
907       ing-point operation with nan as argument returns nan as result.  As for
908       floating-point  comparisons,  = , < , <= , > and >= return false and <>
909       returns true if one or both of their arguments is nan .
910
911
912
913       val max_float : float
914
915       The largest positive finite value of type float .
916
917
918
919       val min_float : float
920
921       The smallest positive, non-zero, non-denormalized value of type float .
922
923
924
925       val epsilon_float : float
926
927       The difference between  1.0  and  the  smallest  exactly  representable
928       floating-point number greater than 1.0 .
929
930
931       type fpclass =
932        | FP_normal  (* Normal number, none of the below
933        *)
934        | FP_subnormal  (* Number very close to 0.0, has reduced precision
935        *)
936        | FP_zero  (* Number is 0.0 or -0.0
937        *)
938        | FP_infinite  (* Number is positive or negative infinity
939        *)
940        | FP_nan  (* Not a number: result of an undefined operation
941        *)
942
943
944       The  five classes of floating-point numbers, as determined by the clas‐
945       sify_float function.
946
947
948
949       val classify_float : float -> fpclass
950
951       Return the class of the given floating-point number: normal, subnormal,
952       zero, infinite, or not a number.
953
954
955
956
957   String operations
958       More string operations are provided in module String .
959
960       val (^) : string -> string -> string
961
962       String  concatenation.  Right-associative operator, see Ocaml_operators
963       for more information.
964
965
966
967
968   Character operations
969       More character operations are provided in module Char .
970
971       val int_of_char : char -> int
972
973       Return the ASCII code of the argument.
974
975
976
977       val char_of_int : int -> char
978
979       Return the character with the given ASCII code.  Raise Invalid_argument
980       char_of_int if the argument is outside the range 0--255.
981
982
983
984
985   Unit operations
986       val ignore : 'a -> unit
987
988       Discard  the  value  of  its  argument  and  return () .  For instance,
989       ignore(f x) discards the result of the side-effecting function f .   It
990       is  equivalent  to f x; () , except that the latter may generate a com‐
991       piler warning; writing ignore(f x) instead avoids the warning.
992
993
994
995
996   String conversion functions
997       val string_of_bool : bool -> string
998
999       Return the string representation of a boolean. As the  returned  values
1000       may be shared, the user should not modify them directly.
1001
1002
1003
1004       val bool_of_string_opt : string -> bool option
1005
1006       Convert the given string to a boolean.
1007
1008       Return None if the string is not true or false .
1009
1010
1011       Since 4.05
1012
1013
1014
1015       val bool_of_string : string -> bool
1016
1017       Same  as bool_of_string_opt , but raise Invalid_argument bool_of_string
1018       instead of returning None .
1019
1020
1021
1022       val string_of_int : int -> string
1023
1024       Return the string representation of an integer, in decimal.
1025
1026
1027
1028       val int_of_string_opt : string -> int option
1029
1030       Convert the given string to an integer.  The string is read in  decimal
1031       (by  default,  or if the string begins with 0u ), in hexadecimal (if it
1032       begins with 0x or 0X ), in octal (if it begins with 0o or 0O ),  or  in
1033       binary (if it begins with 0b or 0B ).
1034
1035       The  0u  prefix reads the input as an unsigned integer in the range [0,
1036       2*max_int+1] .  If the input exceeds max_int it  is  converted  to  the
1037       signed integer min_int + input - max_int - 1 .
1038
1039       The  _  (underscore) character can appear anywhere in the string and is
1040       ignored.
1041
1042       Return None if the given string is not a  valid  representation  of  an
1043       integer,  or  if  the integer represented exceeds the range of integers
1044       representable in type int .
1045
1046
1047       Since 4.05
1048
1049
1050
1051       val int_of_string : string -> int
1052
1053       Same as int_of_string_opt , but raise Failure int_of_string instead  of
1054       returning None .
1055
1056
1057
1058       val string_of_float : float -> string
1059
1060       Return the string representation of a floating-point number.
1061
1062
1063
1064       val float_of_string_opt : string -> float option
1065
1066       Convert the given string to a float.  The string is read in decimal (by
1067       default) or in hexadecimal (marked by 0x or 0X ).
1068
1069       The format of decimal floating-point numbers is [-] dd.ddd (e|E)  [+|-]
1070       dd , where d stands for a decimal digit.
1071
1072       The  format  of hexadecimal floating-point numbers is [-] 0(x|X) hh.hhh
1073       (p|P) [+|-] dd , where h stands for an hexadecimal digit and  d  for  a
1074       decimal digit.
1075
1076       In both cases, at least one of the integer and fractional parts must be
1077       given; the exponent part is optional.
1078
1079       The _ (underscore) character can appear anywhere in the string  and  is
1080       ignored.
1081
1082       Depending  on  the execution platforms, other representations of float‐
1083       ing-point numbers can be accepted, but should not be relied upon.
1084
1085       Return None if the given string is not  a  valid  representation  of  a
1086       float.
1087
1088
1089       Since 4.05
1090
1091
1092
1093       val float_of_string : string -> float
1094
1095       Same as float_of_string_opt , but raise Failure float_of_string instead
1096       of returning None .
1097
1098
1099
1100
1101   Pair operations
1102       val fst : 'a * 'b -> 'a
1103
1104       Return the first component of a pair.
1105
1106
1107
1108       val snd : 'a * 'b -> 'b
1109
1110       Return the second component of a pair.
1111
1112
1113
1114
1115   List operations
1116       More list operations are provided in module List .
1117
1118       val (@) : 'a list -> 'a list -> 'a list
1119
1120       List concatenation.  Not tail-recursive (length of the first argument).
1121       Right-associative operator, see Ocaml_operators for more information.
1122
1123
1124
1125
1126   Input/output
1127       Note:  all  input/output  functions can raise Sys_error when the system
1128       calls they invoke fail.
1129
1130       type in_channel
1131
1132
1133       The type of input channel.
1134
1135
1136       type out_channel
1137
1138
1139       The type of output channel.
1140
1141
1142
1143       val stdin : in_channel
1144
1145       The standard input for the process.
1146
1147
1148
1149       val stdout : out_channel
1150
1151       The standard output for the process.
1152
1153
1154
1155       val stderr : out_channel
1156
1157       The standard error output for the process.
1158
1159
1160
1161
1162   Output functions on standard output
1163       val print_char : char -> unit
1164
1165       Print a character on standard output.
1166
1167
1168
1169       val print_string : string -> unit
1170
1171       Print a string on standard output.
1172
1173
1174
1175       val print_bytes : bytes -> unit
1176
1177       Print a byte sequence on standard output.
1178
1179
1180       Since 4.02.0
1181
1182
1183
1184       val print_int : int -> unit
1185
1186       Print an integer, in decimal, on standard output.
1187
1188
1189
1190       val print_float : float -> unit
1191
1192       Print a floating-point number, in decimal, on standard output.
1193
1194
1195
1196       val print_endline : string -> unit
1197
1198       Print a string, followed by a newline character, on standard output and
1199       flush standard output.
1200
1201
1202
1203       val print_newline : unit -> unit
1204
1205       Print  a  newline character on standard output, and flush standard out‐
1206       put. This can be used to simulate line buffering of standard output.
1207
1208
1209
1210
1211   Output functions on standard error
1212       val prerr_char : char -> unit
1213
1214       Print a character on standard error.
1215
1216
1217
1218       val prerr_string : string -> unit
1219
1220       Print a string on standard error.
1221
1222
1223
1224       val prerr_bytes : bytes -> unit
1225
1226       Print a byte sequence on standard error.
1227
1228
1229       Since 4.02.0
1230
1231
1232
1233       val prerr_int : int -> unit
1234
1235       Print an integer, in decimal, on standard error.
1236
1237
1238
1239       val prerr_float : float -> unit
1240
1241       Print a floating-point number, in decimal, on standard error.
1242
1243
1244
1245       val prerr_endline : string -> unit
1246
1247       Print a string, followed by a newline character on standard  error  and
1248       flush standard error.
1249
1250
1251
1252       val prerr_newline : unit -> unit
1253
1254       Print a newline character on standard error, and flush standard error.
1255
1256
1257
1258
1259   Input functions on standard input
1260       val read_line : unit -> string
1261
1262       Flush standard output, then read characters from standard input until a
1263       newline character is encountered. Return the string of  all  characters
1264       read, without the newline character at the end.
1265
1266
1267
1268       val read_int_opt : unit -> int option
1269
1270       Flush  standard output, then read one line from standard input and con‐
1271       vert it to an integer.
1272
1273       Return None if the line read is not a valid representation of an  inte‐
1274       ger.
1275
1276
1277       Since 4.05
1278
1279
1280
1281       val read_int : unit -> int
1282
1283       Same  as  read_int_opt  ,  but  raise  Failure int_of_string instead of
1284       returning None .
1285
1286
1287
1288       val read_float_opt : unit -> float option
1289
1290       Flush standard output, then read one line from standard input and  con‐
1291       vert it to a floating-point number.
1292
1293       Return  None if the line read is not a valid representation of a float‐
1294       ing-point number.
1295
1296
1297       Since 4.05.0
1298
1299
1300
1301       val read_float : unit -> float
1302
1303       Same as read_float_opt , but raise Failure float_of_string  instead  of
1304       returning None .
1305
1306
1307
1308
1309   General output functions
1310       type open_flag =
1311        | Open_rdonly  (* open for reading.
1312        *)
1313        | Open_wronly  (* open for writing.
1314        *)
1315        | Open_append  (* open for appending: always write at end of file.
1316        *)
1317        | Open_creat  (* create the file if it does not exist.
1318        *)
1319        | Open_trunc  (* empty the file if it already exists.
1320        *)
1321        | Open_excl  (* fail if Open_creat and the file already exists.
1322        *)
1323        | Open_binary  (* open in binary mode (no conversion).
1324        *)
1325        | Open_text  (* open in text mode (may perform conversions).
1326        *)
1327        | Open_nonblock  (* open in non-blocking mode.
1328        *)
1329
1330
1331       Opening modes for open_out_gen and open_in_gen .
1332
1333
1334
1335       val open_out : string -> out_channel
1336
1337       Open  the  named  file  for writing, and return a new output channel on
1338       that file, positioned at the beginning of the file. The file  is  trun‐
1339       cated to zero length if it already exists. It is created if it does not
1340       already exists.
1341
1342
1343
1344       val open_out_bin : string -> out_channel
1345
1346       Same as open_out , but the file is opened in binary mode,  so  that  no
1347       translation takes place during writes. On operating systems that do not
1348       distinguish between text mode and binary mode,  this  function  behaves
1349       like open_out .
1350
1351
1352
1353       val open_out_gen : open_flag list -> int -> string -> out_channel
1354
1355
1356       open_out_gen  mode  perm  filename opens the named file for writing, as
1357       described above. The extra argument mode specifies  the  opening  mode.
1358       The  extra  argument  perm  specifies the file permissions, in case the
1359       file must be created.  open_out and open_out_bin are special  cases  of
1360       this function.
1361
1362
1363
1364       val flush : out_channel -> unit
1365
1366       Flush  the  buffer associated with the given output channel, performing
1367       all pending writes on that channel.  Interactive programs must be care‐
1368       ful  about  flushing  standard  output  and standard error at the right
1369       time.
1370
1371
1372
1373       val flush_all : unit -> unit
1374
1375       Flush all open output channels; ignore errors.
1376
1377
1378
1379       val output_char : out_channel -> char -> unit
1380
1381       Write the character on the given output channel.
1382
1383
1384
1385       val output_string : out_channel -> string -> unit
1386
1387       Write the string on the given output channel.
1388
1389
1390
1391       val output_bytes : out_channel -> bytes -> unit
1392
1393       Write the byte sequence on the given output channel.
1394
1395
1396       Since 4.02.0
1397
1398
1399
1400       val output : out_channel -> bytes -> int -> int -> unit
1401
1402
1403       output oc buf pos len writes len characters from byte  sequence  buf  ,
1404       starting  at  offset  pos  ,  to  the  given output channel oc .  Raise
1405       Invalid_argument output if pos and len do not designate a  valid  range
1406       of buf .
1407
1408
1409
1410       val output_substring : out_channel -> string -> int -> int -> unit
1411
1412       Same  as  output  but  take  a  string  as  argument  instead of a byte
1413       sequence.
1414
1415
1416       Since 4.02.0
1417
1418
1419
1420       val output_byte : out_channel -> int -> unit
1421
1422       Write one 8-bit integer (as the single character with that code) on the
1423       given output channel. The given integer is taken modulo 256.
1424
1425
1426
1427       val output_binary_int : out_channel -> int -> unit
1428
1429       Write  one  integer in binary format (4 bytes, big-endian) on the given
1430       output channel.  The given integer is  taken  modulo  2^32.   The  only
1431       reliable  way to read it back is through the input_binary_int function.
1432       The format is compatible across all machines for  a  given  version  of
1433       OCaml.
1434
1435
1436
1437       val output_value : out_channel -> 'a -> unit
1438
1439       Write  the  representation of a structured value of any type to a chan‐
1440       nel. Circularities and sharing inside the value are detected  and  pre‐
1441       served.  The object can be read back, by the function input_value . See
1442       the description of module Marshal for more  information.   output_value
1443       is equivalent to Marshal.to_channel with an empty list of flags.
1444
1445
1446
1447       val seek_out : out_channel -> int -> unit
1448
1449
1450       seek_out  chan pos sets the current writing position to pos for channel
1451       chan . This works only for regular files. On files of other kinds (such
1452       as terminals, pipes and sockets), the behavior is unspecified.
1453
1454
1455
1456       val pos_out : out_channel -> int
1457
1458       Return  the  current  writing position for the given channel.  Does not
1459       work on channels opened with the Open_append flag (returns  unspecified
1460       results).
1461
1462
1463
1464       val out_channel_length : out_channel -> int
1465
1466       Return the size (number of characters) of the regular file on which the
1467       given channel is opened.  If the channel is opened on a  file  that  is
1468       not a regular file, the result is meaningless.
1469
1470
1471
1472       val close_out : out_channel -> unit
1473
1474       Close  the given channel, flushing all buffered write operations.  Out‐
1475       put functions raise a Sys_error exception when they are  applied  to  a
1476       closed  output  channel,  except close_out and flush , which do nothing
1477       when applied to an already closed channel.   Note  that  close_out  may
1478       raise  Sys_error if the operating system signals an error when flushing
1479       or closing.
1480
1481
1482
1483       val close_out_noerr : out_channel -> unit
1484
1485       Same as close_out , but ignore all errors.
1486
1487
1488
1489       val set_binary_mode_out : out_channel -> bool -> unit
1490
1491
1492       set_binary_mode_out oc true sets the channel  oc  to  binary  mode:  no
1493       translations  take  place  during output.  set_binary_mode_out oc false
1494       sets the channel oc to text mode: depending on  the  operating  system,
1495       some  translations  may  take place during output.  For instance, under
1496       Windows, end-of-lines will be translated from \n to \r\n .  This  func‐
1497       tion  has  no  effect  under  operating systems that do not distinguish
1498       between text mode and binary mode.
1499
1500
1501
1502
1503   General input functions
1504       val open_in : string -> in_channel
1505
1506       Open the named file for reading, and return a new input channel on that
1507       file, positioned at the beginning of the file.
1508
1509
1510
1511       val open_in_bin : string -> in_channel
1512
1513       Same  as  open_in  ,  but the file is opened in binary mode, so that no
1514       translation takes place during reads. On operating systems that do  not
1515       distinguish  between  text  mode and binary mode, this function behaves
1516       like open_in .
1517
1518
1519
1520       val open_in_gen : open_flag list -> int -> string -> in_channel
1521
1522
1523       open_in_gen mode perm filename opens the named  file  for  reading,  as
1524       described  above. The extra arguments mode and perm specify the opening
1525       mode and file permissions.  open_in and open_in_bin are  special  cases
1526       of this function.
1527
1528
1529
1530       val input_char : in_channel -> char
1531
1532       Read  one character from the given input channel.  Raise End_of_file if
1533       there are no more characters to read.
1534
1535
1536
1537       val input_line : in_channel -> string
1538
1539       Read characters from the given input channel, until a newline character
1540       is  encountered.  Return the string of all characters read, without the
1541       newline character at the end.  Raise End_of_file if the end of the file
1542       is reached at the beginning of line.
1543
1544
1545
1546       val input : in_channel -> bytes -> int -> int -> int
1547
1548
1549       input  ic buf pos len reads up to len characters from the given channel
1550       ic , storing them in byte sequence buf , starting at  character  number
1551       pos  .   It returns the actual number of characters read, between 0 and
1552       len (inclusive).  A return value of 0 means that the end  of  file  was
1553       reached.  A return value between 0 and len exclusive means that not all
1554       requested len characters were read, either because no  more  characters
1555       were  available  at  that  time, or because the implementation found it
1556       convenient to do a partial read; input must be called again to read the
1557       remaining  characters,  if desired.  (See also really_input for reading
1558       exactly len characters.)  Exception Invalid_argument input is raised if
1559       pos and len do not designate a valid range of buf .
1560
1561
1562
1563       val really_input : in_channel -> bytes -> int -> int -> unit
1564
1565
1566       really_input  ic  buf  pos  len  reads len characters from channel ic ,
1567       storing them in byte sequence buf , starting at character number pos  .
1568       Raise  End_of_file  if the end of file is reached before len characters
1569       have been read.  Raise Invalid_argument really_input if pos and len  do
1570       not designate a valid range of buf .
1571
1572
1573
1574       val really_input_string : in_channel -> int -> string
1575
1576
1577       really_input_string  ic  len  reads  len characters from channel ic and
1578       returns them in a new string.  Raise End_of_file if the end of file  is
1579       reached before len characters have been read.
1580
1581
1582       Since 4.02.0
1583
1584
1585
1586       val input_byte : in_channel -> int
1587
1588       Same  as  input_char  ,  but  return the 8-bit integer representing the
1589       character.  Raise End_of_file if an end of file was reached.
1590
1591
1592
1593       val input_binary_int : in_channel -> int
1594
1595       Read an integer encoded in binary format (4 bytes, big-endian) from the
1596       given  input  channel. See output_binary_int .  Raise End_of_file if an
1597       end of file was reached while reading the integer.
1598
1599
1600
1601       val input_value : in_channel -> 'a
1602
1603       Read the representation of a structured  value,  as  produced  by  out‐
1604       put_value , and return the corresponding value.  This function is iden‐
1605       tical to Marshal.from_channel ; see the description of  module  Marshal
1606       for more information, in particular concerning the lack of type safety.
1607
1608
1609
1610       val seek_in : in_channel -> int -> unit
1611
1612
1613       seek_in  chan  pos sets the current reading position to pos for channel
1614       chan . This works only for regular files. On files of other kinds,  the
1615       behavior is unspecified.
1616
1617
1618
1619       val pos_in : in_channel -> int
1620
1621       Return the current reading position for the given channel.
1622
1623
1624
1625       val in_channel_length : in_channel -> int
1626
1627       Return the size (number of characters) of the regular file on which the
1628       given channel is opened.  If the channel is opened on a  file  that  is
1629       not  a regular file, the result is meaningless.  The returned size does
1630       not take into account the end-of-line translations  that  can  be  per‐
1631       formed when reading from a channel opened in text mode.
1632
1633
1634
1635       val close_in : in_channel -> unit
1636
1637       Close  the  given channel.  Input functions raise a Sys_error exception
1638       when they are applied to a closed  input  channel,  except  close_in  ,
1639       which does nothing when applied to an already closed channel.
1640
1641
1642
1643       val close_in_noerr : in_channel -> unit
1644
1645       Same as close_in , but ignore all errors.
1646
1647
1648
1649       val set_binary_mode_in : in_channel -> bool -> unit
1650
1651
1652       set_binary_mode_in  ic  true  sets  the  channel  ic to binary mode: no
1653       translations take place during  input.   set_binary_mode_out  ic  false
1654       sets  the  channel  ic to text mode: depending on the operating system,
1655       some translations may take place during  input.   For  instance,  under
1656       Windows,  end-of-lines will be translated from \r\n to \n .  This func‐
1657       tion has no effect under operating  systems  that  do  not  distinguish
1658       between text mode and binary mode.
1659
1660
1661
1662
1663   Operations on large files
1664       module LargeFile : sig end
1665
1666
1667       Operations on large files.  This sub-module provides 64-bit variants of
1668       the channel functions that manipulate file positions  and  file  sizes.
1669       By  representing  positions  and sizes by 64-bit integers (type int64 )
1670       instead of regular integers (type  int  ),  these  alternate  functions
1671       allow operating on files whose sizes are greater than max_int .
1672
1673
1674
1675
1676   References
1677       type 'a ref = {
1678
1679       mutable contents : 'a ;
1680        }
1681
1682
1683       The  type  of references (mutable indirection cells) containing a value
1684       of type 'a .
1685
1686
1687
1688       val ref : 'a -> 'a ref
1689
1690       Return a fresh reference containing the given value.
1691
1692
1693
1694       val (!)  : 'a ref -> 'a
1695
1696
1697       !r returns the current contents of reference r .  Equivalent to  fun  r
1698       ->  r.contents .  Unary operator, see Ocaml_operators for more informa‐
1699       tion.
1700
1701
1702
1703       val (:=) : 'a ref -> 'a -> unit
1704
1705
1706       r := a stores the value of a in reference r .  Equivalent to fun r v ->
1707       r.contents  <- v .  Right-associative operator, see Ocaml_operators for
1708       more information.
1709
1710
1711
1712       val incr : int ref -> unit
1713
1714       Increment the integer contained in the given reference.  Equivalent  to
1715       fun r -> r := succ !r .
1716
1717
1718
1719       val decr : int ref -> unit
1720
1721       Decrement  the integer contained in the given reference.  Equivalent to
1722       fun r -> r := pred !r .
1723
1724
1725
1726
1727   Result type
1728       type ('a, 'b) result =
1729        | Ok of 'a
1730        | Error of 'b
1731
1732
1733       Since 4.03.0
1734
1735
1736
1737
1738   Operations on format strings
1739       Format strings are character strings with special  lexical  conventions
1740       that  defines  the  functionality  of formatted input/output functions.
1741       Format strings are used to read data  with  formatted  input  functions
1742       from  module  Scanf  and  to print data with formatted output functions
1743       from modules Printf and Format .
1744
1745       Format strings are made of three kinds of entities:
1746
1747       -conversions specifications, introduced by the  special  character  '%'
1748       followed  by one or more characters specifying what kind of argument to
1749       read or print,
1750
1751       -formatting indications, introduced by the special character  '@'  fol‐
1752       lowed  by  one  or  more characters specifying how to read or print the
1753       argument,
1754
1755       -plain characters that are regular characters with usual  lexical  con‐
1756       ventions.  Plain  characters  specify string literals to be read in the
1757       input or printed in the output.
1758
1759       There is an additional lexical rule to escape  the  special  characters
1760       '%'  and  '@'  in  format strings: if a special character follows a '%'
1761       character, it is treated as a plain character. In other  words,  %%  is
1762       considered as a plain '%' and %@ as a plain '@' .
1763
1764       For  more  information  about  conversion specifications and formatting
1765       indications available, read the documentation of modules Scanf , Printf
1766       and Format .
1767
1768       Format  strings have a general and highly polymorphic type ('a, 'b, 'c,
1769       'd, 'e, 'f) format6 .  The two simplified  types,  format  and  format4
1770       below  are included for backward compatibility with earlier releases of
1771       OCaml.
1772
1773       The meaning of format string type parameters is as follows:
1774
1775
1776       - 'a is the type of the parameters of the format for  formatted  output
1777       functions ( printf -style functions); 'a is the type of the values read
1778       by the format for formatted input functions ( scanf -style functions).
1779
1780
1781       - 'b is the type of input source for formatted input functions and  the
1782       type  of  output  target  for  formatted  output functions.  For printf
1783       -style functions from module Printf , 'b is typically out_channel ; for
1784       printf  -style  functions  from  module  Format  , 'b is typically For‐
1785       mat.formatter ; for scanf -style functions from module Scanf  ,  'b  is
1786       typically Scanf.Scanning.in_channel .
1787
1788       Type argument 'b is also the type of the first argument given to user's
1789       defined printing functions  for  %a  and  %t  conversions,  and  user's
1790       defined reading functions for %r conversion.
1791
1792
1793       - 'c is the type of the result of the %a and %t printing functions, and
1794       also the type of the argument transmitted  to  the  first  argument  of
1795       kprintf -style functions or to the kscanf -style functions.
1796
1797
1798       - 'd is the type of parameters for the scanf -style functions.
1799
1800
1801       -  'e  is  the type of the receiver function for the scanf -style func‐
1802       tions.
1803
1804
1805       - 'f is the final result type  of  a  formatted  input/output  function
1806       invocation: for the printf -style functions, it is typically unit ; for
1807       the scanf -style functions, it is typically  the  result  type  of  the
1808       receiver function.
1809
1810
1811       type  ('a,  'b, 'c, 'd, 'e, 'f) format6 = ('a, 'b, 'c, 'd, 'e, 'f) Cam‐
1812       linternalFormatBasics.format6
1813
1814
1815
1816
1817       type ('a, 'b, 'c, 'd) format4 = ('a, 'b, 'c, 'c, 'c, 'd) format6
1818
1819
1820
1821
1822       type ('a, 'b, 'c) format = ('a, 'b, 'c, 'c) format4
1823
1824
1825
1826
1827
1828       val string_of_format : ('a, 'b, 'c, 'd, 'e, 'f) format6 -> string
1829
1830       Converts a format string into a string.
1831
1832
1833
1834       val format_of_string : ('a, 'b, 'c, 'd, 'e, 'f) format6 -> ('a, 'b, 'c,
1835       'd, 'e, 'f) format6
1836
1837
1838       format_of_string s returns a format string read from the string literal
1839       s .  Note: format_of_string can not convert a string argument  that  is
1840       not  a  literal.  If  you need this functionality, use the more general
1841       Scanf.format_from_string function.
1842
1843
1844
1845       val (^^) : ('a, 'b, 'c, 'd, 'e, 'f) format6 -> ('f, 'b, 'c, 'e, 'g, 'h)
1846       format6 -> ('a, 'b, 'c, 'd, 'g, 'h) format6
1847
1848
1849       f1  ^^  f2  catenates format strings f1 and f2 . The result is a format
1850       string that behaves as the concatenation of format strings f1 and f2  :
1851       in  case of formatted output, it accepts arguments from f1 , then argu‐
1852       ments from f2 ; in case of formatted input, it returns results from  f1
1853       ,  then results from f2 .  Right-associative operator, see Ocaml_opera‐
1854       tors for more information.
1855
1856
1857
1858
1859   Program termination
1860       val exit : int -> 'a
1861
1862       Terminate the process, returning the given status code to the operating
1863       system:  usually  0 to indicate no errors, and a small positive integer
1864       to indicate  failure.   All  open  output  channels  are  flushed  with
1865       flush_all .  An implicit exit 0 is performed each time a program termi‐
1866       nates normally.  An implicit exit 2 is performed if the program  termi‐
1867       nates early because of an uncaught exception.
1868
1869
1870
1871       val at_exit : (unit -> unit) -> unit
1872
1873       Register  the  given function to be called at program termination time.
1874       The functions registered with at_exit will be called when  the  program
1875       does any of the following:
1876
1877       -executes exit
1878
1879
1880       -terminates, either normally or because of an uncaught exception
1881
1882       -executes  the  C function caml_shutdown .  The functions are called in
1883       'last in, first out' order:  the  function  most  recently  added  with
1884       at_exit is called first.
1885
1886
1887
1888
1889
1890   Standard library modules
1891       module Arg : (module Stdlib__arg)
1892
1893
1894
1895
1896       module Array : (module Stdlib__array)
1897
1898
1899
1900
1901       module ArrayLabels : (module Stdlib__arrayLabels)
1902
1903
1904
1905
1906       module Bigarray : (module Stdlib__bigarray)
1907
1908
1909
1910
1911       module Bool : (module Stdlib__bool)
1912
1913
1914
1915
1916       module Buffer : (module Stdlib__buffer)
1917
1918
1919
1920
1921       module Bytes : (module Stdlib__bytes)
1922
1923
1924
1925
1926       module BytesLabels : (module Stdlib__bytesLabels)
1927
1928
1929
1930
1931       module Callback : (module Stdlib__callback)
1932
1933
1934
1935
1936       module Char : (module Stdlib__char)
1937
1938
1939
1940
1941       module Complex : (module Stdlib__complex)
1942
1943
1944
1945
1946       module Digest : (module Stdlib__digest)
1947
1948
1949
1950
1951       module Ephemeron : (module Stdlib__ephemeron)
1952
1953
1954
1955
1956       module Filename : (module Stdlib__filename)
1957
1958
1959
1960
1961       module Float : (module Stdlib__float)
1962
1963
1964
1965
1966       module Format : (module Stdlib__format)
1967
1968
1969
1970
1971       module Fun : (module Stdlib__fun)
1972
1973
1974
1975
1976       module Gc : (module Stdlib__gc)
1977
1978
1979
1980
1981       module Genlex : (module Stdlib__genlex)
1982
1983
1984
1985
1986       module Hashtbl : (module Stdlib__hashtbl)
1987
1988
1989
1990
1991       module Int : (module Stdlib__int)
1992
1993
1994
1995
1996       module Int32 : (module Stdlib__int32)
1997
1998
1999
2000
2001       module Int64 : (module Stdlib__int64)
2002
2003
2004
2005
2006       module Lazy : (module Stdlib__lazy)
2007
2008
2009
2010
2011       module Lexing : (module Stdlib__lexing)
2012
2013
2014
2015
2016       module List : (module Stdlib__list)
2017
2018
2019
2020
2021       module ListLabels : (module Stdlib__listLabels)
2022
2023
2024
2025
2026       module Map : (module Stdlib__map)
2027
2028
2029
2030
2031       module Marshal : (module Stdlib__marshal)
2032
2033
2034
2035
2036       module MoreLabels : (module Stdlib__moreLabels)
2037
2038
2039
2040
2041       module Nativeint : (module Stdlib__nativeint)
2042
2043
2044
2045
2046       module Obj : (module Stdlib__obj)
2047
2048
2049
2050
2051       module Oo : (module Stdlib__oo)
2052
2053
2054
2055
2056       module Option : (module Stdlib__option)
2057
2058
2059
2060
2061       module Parsing : (module Stdlib__parsing)
2062
2063
2064
2065
2066       module Pervasives : (module Stdlib__pervasives)
2067
2068
2069
2070
2071       module Printexc : (module Stdlib__printexc)
2072
2073
2074
2075
2076       module Printf : (module Stdlib__printf)
2077
2078
2079
2080
2081       module Queue : (module Stdlib__queue)
2082
2083
2084
2085
2086       module Random : (module Stdlib__random)
2087
2088
2089
2090
2091       module Result : (module Stdlib__result)
2092
2093
2094
2095
2096       module Scanf : (module Stdlib__scanf)
2097
2098
2099
2100
2101       module Seq : (module Stdlib__seq)
2102
2103
2104
2105
2106       module Set : (module Stdlib__set)
2107
2108
2109
2110
2111       module Spacetime : (module Stdlib__spacetime)
2112
2113
2114
2115
2116       module Stack : (module Stdlib__stack)
2117
2118
2119
2120
2121       module StdLabels : (module Stdlib__stdLabels)
2122
2123
2124
2125
2126       module Stream : (module Stdlib__stream)
2127
2128
2129
2130
2131       module String : (module Stdlib__string)
2132
2133
2134
2135
2136       module StringLabels : (module Stdlib__stringLabels)
2137
2138
2139
2140
2141       module Sys : (module Stdlib__sys)
2142
2143
2144
2145
2146       module Uchar : (module Stdlib__uchar)
2147
2148
2149
2150
2151       module Unit : (module Stdlib__unit)
2152
2153
2154
2155
2156       module Weak : (module Stdlib__weak)
2157
2158
2159
2160
2161
2162
2163
2164OCamldoc                          2019-07-30                         Stdlib(3)
Impressum