My working unpac repository
at opam/upstream/seq 649 lines 22 kB view raw
1(**************************************************************************) 2(* *) 3(* OCaml *) 4(* *) 5(* Xavier Leroy, projet Cristal, INRIA Rocquencourt *) 6(* *) 7(* Copyright 1996 Institut National de Recherche en Informatique et *) 8(* en Automatique. *) 9(* *) 10(* All rights reserved. This file is distributed under the terms of *) 11(* the GNU Lesser General Public License version 2.1, with the *) 12(* special exception on linking described in the file LICENSE. *) 13(* *) 14(**************************************************************************) 15 16(* Exceptions *) 17 18external register_named_value : string -> 'a -> unit 19 = "caml_register_named_value" 20 21let () = 22 (* for runtime/fail_nat.c *) 23 register_named_value "Pervasives.array_bound_error" 24 (Invalid_argument "index out of bounds") 25 26external raise : exn -> 'a = "%raise" 27external raise_notrace : exn -> 'a = "%raise_notrace" 28 29let failwith s = raise(Failure s) 30let invalid_arg s = raise(Invalid_argument s) 31 32exception Exit 33exception Match_failure = Match_failure 34exception Assert_failure = Assert_failure 35exception Invalid_argument = Invalid_argument 36exception Failure = Failure 37exception Not_found = Not_found 38exception Out_of_memory = Out_of_memory 39exception Stack_overflow = Stack_overflow 40exception Sys_error = Sys_error 41exception End_of_file = End_of_file 42exception Division_by_zero = Division_by_zero 43exception Sys_blocked_io = Sys_blocked_io 44exception Undefined_recursive_module = Undefined_recursive_module 45 46(* Composition operators *) 47 48external ( |> ) : 'a -> ('a -> 'b) -> 'b = "%revapply" 49external ( @@ ) : ('a -> 'b) -> 'a -> 'b = "%apply" 50 51(* Debugging *) 52 53external __LOC__ : string = "%loc_LOC" 54external __FILE__ : string = "%loc_FILE" 55external __LINE__ : int = "%loc_LINE" 56external __MODULE__ : string = "%loc_MODULE" 57external __POS__ : string * int * int * int = "%loc_POS" 58external __FUNCTION__ : string = "%loc_FUNCTION" 59 60external __LOC_OF__ : 'a -> string * 'a = "%loc_LOC" 61external __LINE_OF__ : 'a -> int * 'a = "%loc_LINE" 62external __POS_OF__ : 'a -> (string * int * int * int) * 'a = "%loc_POS" 63 64(* Comparisons *) 65 66external ( = ) : 'a -> 'a -> bool = "%equal" 67external ( <> ) : 'a -> 'a -> bool = "%notequal" 68external ( < ) : 'a -> 'a -> bool = "%lessthan" 69external ( > ) : 'a -> 'a -> bool = "%greaterthan" 70external ( <= ) : 'a -> 'a -> bool = "%lessequal" 71external ( >= ) : 'a -> 'a -> bool = "%greaterequal" 72external compare : 'a -> 'a -> int = "%compare" 73 74let min x y = if x <= y then x else y 75let max x y = if x >= y then x else y 76 77external ( == ) : 'a -> 'a -> bool = "%eq" 78external ( != ) : 'a -> 'a -> bool = "%noteq" 79 80(* Boolean operations *) 81 82external not : bool -> bool = "%boolnot" 83external ( && ) : bool -> bool -> bool = "%sequand" 84external ( || ) : bool -> bool -> bool = "%sequor" 85 86(* Integer operations *) 87 88external ( ~- ) : int -> int = "%negint" 89external ( ~+ ) : int -> int = "%identity" 90external succ : int -> int = "%succint" 91external pred : int -> int = "%predint" 92external ( + ) : int -> int -> int = "%addint" 93external ( - ) : int -> int -> int = "%subint" 94external ( * ) : int -> int -> int = "%mulint" 95external ( / ) : int -> int -> int = "%divint" 96external ( mod ) : int -> int -> int = "%modint" 97 98let abs x = if x >= 0 then x else -x 99 100external ( land ) : int -> int -> int = "%andint" 101external ( lor ) : int -> int -> int = "%orint" 102external ( lxor ) : int -> int -> int = "%xorint" 103 104let lnot x = x lxor (-1) 105 106external ( lsl ) : int -> int -> int = "%lslint" 107external ( lsr ) : int -> int -> int = "%lsrint" 108external ( asr ) : int -> int -> int = "%asrint" 109 110let max_int = (-1) lsr 1 111let min_int = max_int + 1 112 113(* Floating-point operations *) 114 115external ( ~-. ) : float -> float = "%negfloat" 116external ( ~+. ) : float -> float = "%identity" 117external ( +. ) : float -> float -> float = "%addfloat" 118external ( -. ) : float -> float -> float = "%subfloat" 119external ( *. ) : float -> float -> float = "%mulfloat" 120external ( /. ) : float -> float -> float = "%divfloat" 121external ( ** ) : float -> float -> float = "caml_power_float" "pow" 122 [@@unboxed] [@@noalloc] 123external exp : float -> float = "caml_exp_float" "exp" [@@unboxed] [@@noalloc] 124external expm1 : float -> float = "caml_expm1_float" "caml_expm1" 125 [@@unboxed] [@@noalloc] 126external acos : float -> float = "caml_acos_float" "acos" 127 [@@unboxed] [@@noalloc] 128external asin : float -> float = "caml_asin_float" "asin" 129 [@@unboxed] [@@noalloc] 130external atan : float -> float = "caml_atan_float" "atan" 131 [@@unboxed] [@@noalloc] 132external atan2 : float -> float -> float = "caml_atan2_float" "atan2" 133 [@@unboxed] [@@noalloc] 134external hypot : float -> float -> float 135 = "caml_hypot_float" "caml_hypot" [@@unboxed] [@@noalloc] 136external cos : float -> float = "caml_cos_float" "cos" [@@unboxed] [@@noalloc] 137external cosh : float -> float = "caml_cosh_float" "cosh" 138 [@@unboxed] [@@noalloc] 139external acosh : float -> float = "caml_acosh_float" "caml_acosh" 140 [@@unboxed] [@@noalloc] 141external log : float -> float = "caml_log_float" "log" [@@unboxed] [@@noalloc] 142external log10 : float -> float = "caml_log10_float" "log10" 143 [@@unboxed] [@@noalloc] 144external log1p : float -> float = "caml_log1p_float" "caml_log1p" 145 [@@unboxed] [@@noalloc] 146external sin : float -> float = "caml_sin_float" "sin" [@@unboxed] [@@noalloc] 147external sinh : float -> float = "caml_sinh_float" "sinh" 148 [@@unboxed] [@@noalloc] 149external asinh : float -> float = "caml_asinh_float" "caml_asinh" 150 [@@unboxed] [@@noalloc] 151external sqrt : float -> float = "caml_sqrt_float" "sqrt" 152 [@@unboxed] [@@noalloc] 153external tan : float -> float = "caml_tan_float" "tan" [@@unboxed] [@@noalloc] 154external tanh : float -> float = "caml_tanh_float" "tanh" 155 [@@unboxed] [@@noalloc] 156external atanh : float -> float = "caml_atanh_float" "caml_atanh" 157 [@@unboxed] [@@noalloc] 158external ceil : float -> float = "caml_ceil_float" "ceil" 159 [@@unboxed] [@@noalloc] 160external floor : float -> float = "caml_floor_float" "floor" 161 [@@unboxed] [@@noalloc] 162external abs_float : float -> float = "%absfloat" 163external copysign : float -> float -> float 164 = "caml_copysign_float" "caml_copysign" 165 [@@unboxed] [@@noalloc] 166external mod_float : float -> float -> float = "caml_fmod_float" "fmod" 167 [@@unboxed] [@@noalloc] 168external frexp : float -> float * int = "caml_frexp_float" 169external ldexp : (float [@unboxed]) -> (int [@untagged]) -> (float [@unboxed]) = 170 "caml_ldexp_float" "caml_ldexp_float_unboxed" [@@noalloc] 171external modf : float -> float * float = "caml_modf_float" 172external float : int -> float = "%floatofint" 173external float_of_int : int -> float = "%floatofint" 174external truncate : float -> int = "%intoffloat" 175external int_of_float : float -> int = "%intoffloat" 176external float_of_bits : int64 -> float 177 = "caml_int64_float_of_bits" "caml_int64_float_of_bits_unboxed" 178 [@@unboxed] [@@noalloc] 179let infinity = 180 float_of_bits 0x7F_F0_00_00_00_00_00_00L 181let neg_infinity = 182 float_of_bits 0xFF_F0_00_00_00_00_00_00L 183let nan = 184 float_of_bits 0x7F_F8_00_00_00_00_00_01L 185let max_float = 186 float_of_bits 0x7F_EF_FF_FF_FF_FF_FF_FFL 187let min_float = 188 float_of_bits 0x00_10_00_00_00_00_00_00L 189let epsilon_float = 190 float_of_bits 0x3C_B0_00_00_00_00_00_00L 191 192type fpclass = 193 FP_normal 194 | FP_subnormal 195 | FP_zero 196 | FP_infinite 197 | FP_nan 198external classify_float : (float [@unboxed]) -> fpclass = 199 "caml_classify_float" "caml_classify_float_unboxed" [@@noalloc] 200 201(* String and byte sequence operations -- more in modules String and Bytes *) 202 203external string_length : string -> int = "%string_length" 204external bytes_length : bytes -> int = "%bytes_length" 205external bytes_create : int -> bytes = "caml_create_bytes" 206external string_blit : string -> int -> bytes -> int -> int -> unit 207 = "caml_blit_string" [@@noalloc] 208external bytes_blit : bytes -> int -> bytes -> int -> int -> unit 209 = "caml_blit_bytes" [@@noalloc] 210external bytes_unsafe_to_string : bytes -> string = "%bytes_to_string" 211 212let ( ^ ) s1 s2 = 213 let l1 = string_length s1 and l2 = string_length s2 in 214 let s = bytes_create (l1 + l2) in 215 string_blit s1 0 s 0 l1; 216 string_blit s2 0 s l1 l2; 217 bytes_unsafe_to_string s 218 219(* Character operations -- more in module Char *) 220 221external int_of_char : char -> int = "%identity" 222external unsafe_char_of_int : int -> char = "%identity" 223let char_of_int n = 224 if n < 0 || n > 255 then invalid_arg "char_of_int" else unsafe_char_of_int n 225 226(* Unit operations *) 227 228external ignore : 'a -> unit = "%ignore" 229 230(* Pair operations *) 231 232external fst : 'a * 'b -> 'a = "%field0" 233external snd : 'a * 'b -> 'b = "%field1" 234 235(* References *) 236 237type 'a ref = { mutable contents : 'a } 238external ref : 'a -> 'a ref = "%makemutable" 239external ( ! ) : 'a ref -> 'a = "%field0" 240external ( := ) : 'a ref -> 'a -> unit = "%setfield0" 241external incr : int ref -> unit = "%incr" 242external decr : int ref -> unit = "%decr" 243 244(* Result type *) 245 246type ('a,'b) result = Ok of 'a | Error of 'b 247 248(* String conversion functions *) 249 250external format_int : string -> int -> string = "caml_format_int" 251external format_float : string -> float -> string = "caml_format_float" 252 253let string_of_bool b = 254 if b then "true" else "false" 255let bool_of_string = function 256 | "true" -> true 257 | "false" -> false 258 | _ -> invalid_arg "bool_of_string" 259 260let bool_of_string_opt = function 261 | "true" -> Some true 262 | "false" -> Some false 263 | _ -> None 264 265let string_of_int n = 266 format_int "%d" n 267 268external int_of_string : string -> int = "caml_int_of_string" 269 270let int_of_string_opt s = 271 (* Trashes current backtrace *) 272 try Some (int_of_string s) 273 with Failure _ -> None 274 275external string_get : string -> int -> char = "%string_safe_get" 276 277let valid_float_lexem s = 278 let l = string_length s in 279 let rec loop i = 280 if i >= l then s ^ "." else 281 match string_get s i with 282 | '0' .. '9' | '-' -> loop (i + 1) 283 | _ -> s 284 in 285 loop 0 286 287let string_of_float f = valid_float_lexem (format_float "%.12g" f) 288 289external float_of_string : string -> float = "caml_float_of_string" 290 291let float_of_string_opt s = 292 (* Trashes current backtrace *) 293 try Some (float_of_string s) 294 with Failure _ -> None 295 296(* List operations -- more in module List *) 297 298let[@tail_mod_cons] rec ( @ ) l1 l2 = 299 match l1 with 300 | [] -> l2 301 | h1 :: [] -> h1 :: l2 302 | h1 :: h2 :: [] -> h1 :: h2 :: l2 303 | h1 :: h2 :: h3 :: tl -> h1 :: h2 :: h3 :: (tl @ l2) 304 305(* I/O operations *) 306 307type in_channel 308type out_channel 309 310external open_descriptor_out : int -> out_channel 311 = "caml_ml_open_descriptor_out" 312external open_descriptor_in : int -> in_channel = "caml_ml_open_descriptor_in" 313 314let stdin = open_descriptor_in 0 315let stdout = open_descriptor_out 1 316let stderr = open_descriptor_out 2 317 318(* General output functions *) 319 320type open_flag = 321 Open_rdonly | Open_wronly | Open_append 322 | Open_creat | Open_trunc | Open_excl 323 | Open_binary | Open_text | Open_nonblock 324 325external open_desc : string -> open_flag list -> int -> int = "caml_sys_open" 326 327external set_out_channel_name: out_channel -> string -> unit = 328 "caml_ml_set_channel_name" 329 330let open_out_gen mode perm name = 331 let c = open_descriptor_out(open_desc name mode perm) in 332 set_out_channel_name c name; 333 c 334 335let open_out name = 336 open_out_gen [Open_wronly; Open_creat; Open_trunc; Open_text] 0o666 name 337 338let open_out_bin name = 339 open_out_gen [Open_wronly; Open_creat; Open_trunc; Open_binary] 0o666 name 340 341external flush : out_channel -> unit = "caml_ml_flush" 342 343external out_channels_list : unit -> out_channel list 344 = "caml_ml_out_channels_list" 345 346let flush_all () = 347 let rec iter = function 348 [] -> () 349 | a::l -> 350 begin try 351 flush a 352 with Sys_error _ -> 353 () (* ignore channels closed during a preceding flush. *) 354 end; 355 iter l 356 in iter (out_channels_list ()) 357 358external unsafe_output : out_channel -> bytes -> int -> int -> unit 359 = "caml_ml_output_bytes" 360external unsafe_output_string : out_channel -> string -> int -> int -> unit 361 = "caml_ml_output" 362 363external output_char : out_channel -> char -> unit = "caml_ml_output_char" 364 365let output_bytes oc s = 366 unsafe_output oc s 0 (bytes_length s) 367 368let output_string oc s = 369 unsafe_output_string oc s 0 (string_length s) 370 371let output oc s ofs len = 372 if ofs < 0 || len < 0 || ofs > bytes_length s - len 373 then invalid_arg "output" 374 else unsafe_output oc s ofs len 375 376let output_substring oc s ofs len = 377 if ofs < 0 || len < 0 || ofs > string_length s - len 378 then invalid_arg "output_substring" 379 else unsafe_output_string oc s ofs len 380 381external output_byte : out_channel -> int -> unit = "caml_ml_output_char" 382external output_binary_int : out_channel -> int -> unit = "caml_ml_output_int" 383 384external marshal_to_channel : out_channel -> 'a -> unit list -> unit 385 = "caml_output_value" 386let output_value chan v = marshal_to_channel chan v [] 387 388external seek_out : out_channel -> int -> unit = "caml_ml_seek_out" 389external pos_out : out_channel -> int = "caml_ml_pos_out" 390external out_channel_length : out_channel -> int = "caml_ml_channel_size" 391external close_out_channel : out_channel -> unit = "caml_ml_close_channel" 392let close_out oc = flush oc; close_out_channel oc 393let close_out_noerr oc = 394 (try flush oc with _ -> ()); 395 (try close_out_channel oc with _ -> ()) 396external set_binary_mode_out : out_channel -> bool -> unit 397 = "caml_ml_set_binary_mode" 398 399(* General input functions *) 400 401external set_in_channel_name: in_channel -> string -> unit = 402 "caml_ml_set_channel_name" 403 404let open_in_gen mode perm name = 405 let c = open_descriptor_in(open_desc name mode perm) in 406 set_in_channel_name c name; 407 c 408 409let open_in name = 410 open_in_gen [Open_rdonly; Open_text] 0 name 411 412let open_in_bin name = 413 open_in_gen [Open_rdonly; Open_binary] 0 name 414 415external input_char : in_channel -> char = "caml_ml_input_char" 416 417external unsafe_input : in_channel -> bytes -> int -> int -> int 418 = "caml_ml_input" 419 420let input ic s ofs len = 421 if ofs < 0 || len < 0 || ofs > bytes_length s - len 422 then invalid_arg "input" 423 else unsafe_input ic s ofs len 424 425let rec unsafe_really_input ic s ofs len = 426 if len <= 0 then () else begin 427 let r = unsafe_input ic s ofs len in 428 if r = 0 429 then raise End_of_file 430 else unsafe_really_input ic s (ofs + r) (len - r) 431 end 432 433let really_input ic s ofs len = 434 if ofs < 0 || len < 0 || ofs > bytes_length s - len 435 then invalid_arg "really_input" 436 else unsafe_really_input ic s ofs len 437 438let really_input_string ic len = 439 let s = bytes_create len in 440 really_input ic s 0 len; 441 bytes_unsafe_to_string s 442 443external input_scan_line : in_channel -> int = "caml_ml_input_scan_line" 444 445let input_line chan = 446 let rec build_result buf pos = function 447 [] -> buf 448 | hd :: tl -> 449 let len = bytes_length hd in 450 bytes_blit hd 0 buf (pos - len) len; 451 build_result buf (pos - len) tl in 452 let rec scan accu len = 453 let n = input_scan_line chan in 454 if n = 0 then begin (* n = 0: we are at EOF *) 455 match accu with 456 [] -> raise End_of_file 457 | _ -> build_result (bytes_create len) len accu 458 end else if n > 0 then begin (* n > 0: newline found in buffer *) 459 let res = bytes_create (n - 1) in 460 ignore (unsafe_input chan res 0 (n - 1)); 461 ignore (input_char chan); (* skip the newline *) 462 match accu with 463 [] -> res 464 | _ -> let len = len + n - 1 in 465 build_result (bytes_create len) len (res :: accu) 466 end else begin (* n < 0: newline not found *) 467 let beg = bytes_create (-n) in 468 ignore(unsafe_input chan beg 0 (-n)); 469 scan (beg :: accu) (len - n) 470 end 471 in bytes_unsafe_to_string (scan [] 0) 472 473external input_byte : in_channel -> int = "caml_ml_input_char" 474external input_binary_int : in_channel -> int = "caml_ml_input_int" 475external input_value : in_channel -> 'a = "caml_input_value" 476external seek_in : in_channel -> int -> unit = "caml_ml_seek_in" 477external pos_in : in_channel -> int = "caml_ml_pos_in" 478external in_channel_length : in_channel -> int = "caml_ml_channel_size" 479external close_in : in_channel -> unit = "caml_ml_close_channel" 480let close_in_noerr ic = (try close_in ic with _ -> ()) 481external set_binary_mode_in : in_channel -> bool -> unit 482 = "caml_ml_set_binary_mode" 483 484(* Output functions on standard output *) 485 486let print_char c = output_char stdout c 487let print_string s = output_string stdout s 488let print_bytes s = output_bytes stdout s 489let print_int i = output_string stdout (string_of_int i) 490let print_float f = output_string stdout (string_of_float f) 491let print_endline s = 492 output_string stdout s; output_char stdout '\n'; flush stdout 493let print_newline () = output_char stdout '\n'; flush stdout 494 495(* Output functions on standard error *) 496 497let prerr_char c = output_char stderr c 498let prerr_string s = output_string stderr s 499let prerr_bytes s = output_bytes stderr s 500let prerr_int i = output_string stderr (string_of_int i) 501let prerr_float f = output_string stderr (string_of_float f) 502let prerr_endline s = 503 output_string stderr s; output_char stderr '\n'; flush stderr 504let prerr_newline () = output_char stderr '\n'; flush stderr 505 506(* Input functions on standard input *) 507 508let read_line () = flush stdout; input_line stdin 509let read_int () = int_of_string(read_line()) 510let read_int_opt () = int_of_string_opt(read_line()) 511let read_float () = float_of_string(read_line()) 512let read_float_opt () = float_of_string_opt(read_line()) 513 514(* Operations on large files *) 515 516module LargeFile = 517 struct 518 external seek_out : out_channel -> int64 -> unit = "caml_ml_seek_out_64" 519 external pos_out : out_channel -> int64 = "caml_ml_pos_out_64" 520 external out_channel_length : out_channel -> int64 521 = "caml_ml_channel_size_64" 522 external seek_in : in_channel -> int64 -> unit = "caml_ml_seek_in_64" 523 external pos_in : in_channel -> int64 = "caml_ml_pos_in_64" 524 external in_channel_length : in_channel -> int64 = "caml_ml_channel_size_64" 525 end 526 527(* Formats *) 528 529type ('a, 'b, 'c, 'd, 'e, 'f) format6 530 = ('a, 'b, 'c, 'd, 'e, 'f) CamlinternalFormatBasics.format6 531 = Format of ('a, 'b, 'c, 'd, 'e, 'f) CamlinternalFormatBasics.fmt 532 * string 533 534type ('a, 'b, 'c, 'd) format4 = ('a, 'b, 'c, 'c, 'c, 'd) format6 535 536type ('a, 'b, 'c) format = ('a, 'b, 'c, 'c) format4 537 538let string_of_format (Format (_fmt, str)) = str 539 540external format_of_string : 541 ('a, 'b, 'c, 'd, 'e, 'f) format6 -> 542 ('a, 'b, 'c, 'd, 'e, 'f) format6 = "%identity" 543 544let ( ^^ ) (Format (fmt1, str1)) (Format (fmt2, str2)) = 545 Format (CamlinternalFormatBasics.concat_fmt fmt1 fmt2, 546 str1 ^ "%," ^ str2) 547 548(* Miscellaneous *) 549 550external sys_exit : int -> 'a = "caml_sys_exit" 551 552(* for at_exit *) 553type 'a atomic_t 554external atomic_make : 'a -> 'a atomic_t = "%makemutable" 555external atomic_get : 'a atomic_t -> 'a = "%atomic_load" 556external atomic_compare_and_set : 'a atomic_t -> 'a -> 'a -> bool 557 = "%atomic_cas" 558 559let exit_function = atomic_make flush_all 560 561let rec at_exit f = 562 (* MPR#7253, MPR#7796: make sure "f" is executed only once *) 563 let f_yet_to_run = atomic_make true in 564 let old_exit = atomic_get exit_function in 565 let new_exit () = 566 if atomic_compare_and_set f_yet_to_run true false then f () ; 567 old_exit () 568 in 569 let success = atomic_compare_and_set exit_function old_exit new_exit in 570 if not success then at_exit f 571 572let do_domain_local_at_exit = ref (fun () -> ()) 573 574let do_at_exit () = 575 (!do_domain_local_at_exit) (); 576 (atomic_get exit_function) () 577 578let exit retcode = 579 do_at_exit (); 580 sys_exit retcode 581 582let _ = register_named_value "Pervasives.do_at_exit" do_at_exit 583 584(*MODULE_ALIASES*) 585module Arg = Arg 586module Array = Array 587module ArrayLabels = ArrayLabels 588module Atomic = Atomic 589module Bigarray = Bigarray 590module Bool = Bool 591module Buffer = Buffer 592module Bytes = Bytes 593module BytesLabels = BytesLabels 594module Callback = Callback 595module Char = Char 596module Complex = Complex 597module Condition = Condition 598module Digest = Digest 599module Domain = Domain 600module Dynarray = Dynarray 601module Pqueue = Pqueue 602module Effect = Effect 603module Either = Either 604module Ephemeron = Ephemeron 605module Filename = Filename 606module Float = Float 607module Format = Format 608module Fun = Fun 609module Gc = Gc 610module Hashtbl = Hashtbl 611module Iarray = Iarray 612module In_channel = In_channel 613module Int = Int 614module Int32 = Int32 615module Int64 = Int64 616module Lazy = Lazy 617module Lexing = Lexing 618module List = List 619module ListLabels = ListLabels 620module Map = Map 621module Marshal = Marshal 622module MoreLabels = MoreLabels 623module Mutex = Mutex 624module Nativeint = Nativeint 625module Obj = Obj 626module Oo = Oo 627module Option = Option 628module Out_channel = Out_channel 629module Pair = Pair 630module Parsing = Parsing 631module Printexc = Printexc 632module Printf = Printf 633module Queue = Queue 634module Random = Random 635module Result = Result 636module Repr = Repr 637module Scanf = Scanf 638module Semaphore = Semaphore 639module Seq = Seq 640module Set = Set 641module Stack = Stack 642module StdLabels = StdLabels 643module String = String 644module StringLabels = StringLabels 645module Sys = Sys 646module Type = Type 647module Uchar = Uchar 648module Unit = Unit 649module Weak = Weak