package base
Full standard library replacement for OCaml
Install
Dune Dependency
Authors
Maintainers
Sources
v0.17.3.tar.gz
md5=2100b0ed13fecf43be86ed45c5b2cc4d
sha512=628610caff7e124631870fa1e29661caac28bdfdb18750ee43b868037da3d65d6dd9023b4be7c4c52405679efb5e865a6632d95606a22b28a36636a6bf706ef3
doc/src/base/base.ml.html
Source file base.ml
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 350 351 352 353 354 355 356 357 358 359 360 361 362 363 364 365 366 367 368 369 370 371 372 373 374 375 376 377 378 379 380 381 382 383 384 385 386 387 388 389 390 391 392 393 394 395 396 397 398 399 400 401 402 403 404 405 406 407 408 409 410 411 412 413 414 415 416 417 418 419 420 421 422 423 424 425 426 427 428 429 430 431 432 433 434 435 436 437 438 439 440 441 442 443 444 445 446 447 448 449 450 451 452 453 454 455 456 457 458 459 460 461 462 463 464 465 466 467 468 469 470 471 472 473 474 475 476 477 478 479 480 481 482 483 484 485 486 487 488 489 490 491 492 493 494 495 496 497 498 499 500 501 502 503 504 505 506 507 508 509 510 511 512 513 514 515 516 517 518 519 520 521 522 523 524 525 526 527 528 529 530 531 532 533 534 535 536 537 538 539 540 541 542 543 544 545 546 547 548 549 550 551 552 553 554 555 556 557 558 559 560 561 562 563 564 565 566 567 568 569 570 571 572 573 574 575 576 577 578 579 580 581 582 583 584 585 586 587 588 589 590 591 592 593 594 595 596 597 598 599 600 601 602 603 604 605 606 607 608 609 610 611 612 613 614 615 616 617 618 619 620 621 622 623 624 625 626 627 628 629 630 631 632 633 634 635 636 637 638 639 640 641 642 643 644 645 646 647 648 649 650 651 652 653 654 655 656 657 658 659 660 661 662 663 664 665 666 667 668 669 670 671 672 673 674 675 676 677 678 679 680 681 682 683 684 685 686 687 688 689 690 691 692 693 694 695 696 697 698 699 700 701 702 703 704 705 706 707 708 709 710 711 712
(** This module is the toplevel of the Base library; it's what you get when you write [open Base]. The goal of Base is both to be a more complete standard library, with richer APIs, and to be more consistent in its design. For instance, in the standard library some things have modules and others don't; in Base, everything is a module. Base extends some modules and data structures from the standard library, like [Array], [Buffer], [Bytes], [Char], [Hashtbl], [Int32], [Int64], [Lazy], [List], [Map], [Nativeint], [Printf], [Random], [Set], [String], [Sys], and [Uchar]. One key difference is that Base doesn't use exceptions as much as the standard library and instead makes heavy use of the [Result] type, as in: {[ type ('a,'b) result = Ok of 'a | Error of 'b ]} Base also adds entirely new modules, most notably: - [Comparable], [Comparator], and [Comparisons] in lieu of polymorphic compare. - [Container], which provides a consistent interface across container-like data structures (arrays, lists, strings). - [Result], [Error], and [Or_error], supporting the or-error pattern. *) (*_ We hide this from the web docs because the line wrapping is bad, making it pretty much inscrutable. *) (**/**) (* The intent is to shadow all of INRIA's standard library. Modules below would cause compilation errors without being removed from [Shadow_stdlib] before inclusion. *) include ( Shadow_stdlib : module type of struct include Shadow_stdlib end (* Modules defined in Base *) with module Array := Shadow_stdlib.Array with module Atomic := Shadow_stdlib.Atomic with module Bool := Shadow_stdlib.Bool with module Buffer := Shadow_stdlib.Buffer with module Bytes := Shadow_stdlib.Bytes with module Char := Shadow_stdlib.Char with module Condition := Shadow_stdlib.Condition with module Either := Shadow_stdlib.Either with module Float := Shadow_stdlib.Float with module Hashtbl := Shadow_stdlib.Hashtbl with module In_channel := Shadow_stdlib.In_channel with module Int := Shadow_stdlib.Int with module Int32 := Shadow_stdlib.Int32 with module Int64 := Shadow_stdlib.Int64 with module Lazy := Shadow_stdlib.Lazy with module List := Shadow_stdlib.List with module Map := Shadow_stdlib.Map with module Nativeint := Shadow_stdlib.Nativeint with module Option := Shadow_stdlib.Option with module Out_channel := Shadow_stdlib.Out_channel with module Printf := Shadow_stdlib.Printf with module Queue := Shadow_stdlib.Queue with module Random := Shadow_stdlib.Random with module Result := Shadow_stdlib.Result with module Set := Shadow_stdlib.Set with module Semaphore := Shadow_stdlib.Semaphore with module Stack := Shadow_stdlib.Stack with module String := Shadow_stdlib.String with module Sys := Shadow_stdlib.Sys with module Uchar := Shadow_stdlib.Uchar with module Unit := Shadow_stdlib.Unit (* OCaml 5-related modules we don't want to start shadowing yet. *) with module Domain := Shadow_stdlib.Domain with module Type := Shadow_stdlib.Type (* Support for generated lexers *) with module Lexing := Shadow_stdlib.Lexing with type ('a, 'b, 'c) format := ('a, 'b, 'c) format with type ('a, 'b, 'c, 'd) format4 := ('a, 'b, 'c, 'd) format4 with type ('a, 'b, 'c, 'd, 'e, 'f) format6 := ('a, 'b, 'c, 'd, 'e, 'f) format6 with type 'a ref := 'a ref) [@ocaml.warning "-3"] (**/**) open! Import module Applicative = Applicative module Array = Array module Avltree = Avltree module Backtrace = Backtrace module Binary_search = Binary_search module Binary_searchable = Binary_searchable module Blit = Blit module Bool = Bool module Buffer = Buffer module Bytes = Bytes module Char = Char module Comparable = Comparable module Comparator = Comparator module Comparisons = Comparisons module Container = Container module Either = Either module Equal = Equal module Error = Error module Exn = Exn module Field = Field module Float = Float module Floatable = Floatable module Fn = Fn module Formatter = Formatter module Hash = Hash module Hash_set = Hash_set module Hashable = Hashable module Hasher = Hasher module Hashtbl = Hashtbl module Identifiable = Identifiable module Indexed_container = Indexed_container module Info = Info module Int = Int module Int32 = Int32 module Int63 = Int63 module Int64 = Int64 module Intable = Intable module Int_math = Int_math module Invariant = Invariant module Dictionary_immutable = Dictionary_immutable module Dictionary_mutable = Dictionary_mutable module Lazy = Lazy module List = List module Map = Map module Maybe_bound = Maybe_bound module Monad = Monad module Nativeint = Nativeint module Nothing = Nothing module Option = Option module Option_array = Option_array module Or_error = Or_error module Ordered_collection_common = Ordered_collection_common module Ordering = Ordering module Poly = Poly module Pretty_printer = Pretty_printer module Printf = Printf module Linked_queue = Linked_queue module Queue = Queue module Random = Random module Ref = Ref module Result = Result module Sequence = Sequence module Set = Set module Sexpable = Sexpable module Sign = Sign module Sign_or_nan = Sign_or_nan module Source_code_position = Source_code_position module Stack = Stack module Staged = Staged module String = String module Stringable = Stringable module Sys = Sys module T = T module Type_equal = Type_equal module Uniform_array = Uniform_array module Unit = Unit module Uchar = Uchar module Variant = Variant module With_return = With_return module Word_size = Word_size (* Avoid a level of indirection for uses of the signatures defined in [T]. *) include T (* This is a hack so that odoc creates better documentation. *) module Sexp = struct include Sexp_with_comparable (** @inline *) end (* [Int_string_conversions] is separated from [Int_conversions] for dependency reasons, but this separation is not important for clients. *) module Int_conversions = struct include Int_conversions include Int_string_conversions end (**/**) module Exported_for_specific_uses = struct module Fieldslib = Fieldslib module Globalize = Globalize module Obj_local = Obj_local module Ppx_compare_lib = Ppx_compare_lib module Ppx_enumerate_lib = Ppx_enumerate_lib module Ppx_hash_lib = Ppx_hash_lib module Variantslib = Variantslib let am_testing = am_testing end (**/**) module Export = struct (* [deriving hash] is missing for [array] and [ref] since these types are mutable. *) type 'a array = 'a Array.t [@@deriving_inline compare ~localize, equal ~localize, globalize, sexp, sexp_grammar] let compare_array__local : 'a. ('a -> 'a -> int) -> 'a array -> 'a array -> int = Array.compare__local ;; let compare_array : 'a. ('a -> 'a -> int) -> 'a array -> 'a array -> int = Array.compare let equal_array__local : 'a. ('a -> 'a -> bool) -> 'a array -> 'a array -> bool = Array.equal__local ;; let equal_array : 'a. ('a -> 'a -> bool) -> 'a array -> 'a array -> bool = Array.equal let globalize_array : 'a. ('a -> 'a) -> 'a array -> 'a array = fun (type a__017_) : ((a__017_ -> a__017_) -> a__017_ array -> a__017_ array) -> Array.globalize ;; let array_of_sexp : 'a. (Sexplib0.Sexp.t -> 'a) -> Sexplib0.Sexp.t -> 'a array = Array.t_of_sexp ;; let sexp_of_array : 'a. ('a -> Sexplib0.Sexp.t) -> 'a array -> Sexplib0.Sexp.t = Array.sexp_of_t ;; let array_sexp_grammar : 'a. 'a Sexplib0.Sexp_grammar.t -> 'a array Sexplib0.Sexp_grammar.t = fun _'a_sexp_grammar -> Array.t_sexp_grammar _'a_sexp_grammar ;; [@@@end] type bool = Bool.t [@@deriving_inline compare ~localize, equal ~localize, globalize, hash, sexp, sexp_grammar] let compare_bool__local = (Bool.compare__local : bool -> bool -> int) let compare_bool = (fun a b -> compare_bool__local a b : bool -> bool -> int) let equal_bool__local = (Bool.equal__local : bool -> bool -> bool) let equal_bool = (fun a b -> equal_bool__local a b : bool -> bool -> bool) let (globalize_bool : bool -> bool) = (Bool.globalize : bool -> bool) let (hash_fold_bool : Ppx_hash_lib.Std.Hash.state -> bool -> Ppx_hash_lib.Std.Hash.state) = Bool.hash_fold_t and (hash_bool : bool -> Ppx_hash_lib.Std.Hash.hash_value) = let func = Bool.hash in fun x -> func x ;; let bool_of_sexp = (Bool.t_of_sexp : Sexplib0.Sexp.t -> bool) let sexp_of_bool = (Bool.sexp_of_t : bool -> Sexplib0.Sexp.t) let (bool_sexp_grammar : bool Sexplib0.Sexp_grammar.t) = Bool.t_sexp_grammar [@@@end] type char = Char.t [@@deriving_inline compare ~localize, equal ~localize, globalize, hash, sexp, sexp_grammar] let compare_char__local = (Char.compare__local : char -> char -> int) let compare_char = (fun a b -> compare_char__local a b : char -> char -> int) let equal_char__local = (Char.equal__local : char -> char -> bool) let equal_char = (fun a b -> equal_char__local a b : char -> char -> bool) let (globalize_char : char -> char) = (Char.globalize : char -> char) let (hash_fold_char : Ppx_hash_lib.Std.Hash.state -> char -> Ppx_hash_lib.Std.Hash.state) = Char.hash_fold_t and (hash_char : char -> Ppx_hash_lib.Std.Hash.hash_value) = let func = Char.hash in fun x -> func x ;; let char_of_sexp = (Char.t_of_sexp : Sexplib0.Sexp.t -> char) let sexp_of_char = (Char.sexp_of_t : char -> Sexplib0.Sexp.t) let (char_sexp_grammar : char Sexplib0.Sexp_grammar.t) = Char.t_sexp_grammar [@@@end] type exn = Exn.t [@@deriving_inline sexp_of] let sexp_of_exn = (Exn.sexp_of_t : exn -> Sexplib0.Sexp.t) [@@@end] type float = Float.t [@@deriving_inline compare ~localize, equal ~localize, globalize, hash, sexp, sexp_grammar] let compare_float__local = (Float.compare__local : float -> float -> int) let compare_float = (fun a b -> compare_float__local a b : float -> float -> int) let equal_float__local = (Float.equal__local : float -> float -> bool) let equal_float = (fun a b -> equal_float__local a b : float -> float -> bool) let (globalize_float : float -> float) = (Float.globalize : float -> float) let (hash_fold_float : Ppx_hash_lib.Std.Hash.state -> float -> Ppx_hash_lib.Std.Hash.state) = Float.hash_fold_t and (hash_float : float -> Ppx_hash_lib.Std.Hash.hash_value) = let func = Float.hash in fun x -> func x ;; let float_of_sexp = (Float.t_of_sexp : Sexplib0.Sexp.t -> float) let sexp_of_float = (Float.sexp_of_t : float -> Sexplib0.Sexp.t) let (float_sexp_grammar : float Sexplib0.Sexp_grammar.t) = Float.t_sexp_grammar [@@@end] type int = Int.t [@@deriving_inline compare ~localize, equal ~localize, globalize, hash, sexp, sexp_grammar] let compare_int__local = (Int.compare__local : int -> int -> int) let compare_int = (fun a b -> compare_int__local a b : int -> int -> int) let equal_int__local = (Int.equal__local : int -> int -> bool) let equal_int = (fun a b -> equal_int__local a b : int -> int -> bool) let (globalize_int : int -> int) = (Int.globalize : int -> int) let (hash_fold_int : Ppx_hash_lib.Std.Hash.state -> int -> Ppx_hash_lib.Std.Hash.state) = Int.hash_fold_t and (hash_int : int -> Ppx_hash_lib.Std.Hash.hash_value) = let func = Int.hash in fun x -> func x ;; let int_of_sexp = (Int.t_of_sexp : Sexplib0.Sexp.t -> int) let sexp_of_int = (Int.sexp_of_t : int -> Sexplib0.Sexp.t) let (int_sexp_grammar : int Sexplib0.Sexp_grammar.t) = Int.t_sexp_grammar [@@@end] type int32 = Int32.t [@@deriving_inline compare ~localize, equal ~localize, globalize, hash, sexp, sexp_grammar] let compare_int32__local = (Int32.compare__local : int32 -> int32 -> int) let compare_int32 = (fun a b -> compare_int32__local a b : int32 -> int32 -> int) let equal_int32__local = (Int32.equal__local : int32 -> int32 -> bool) let equal_int32 = (fun a b -> equal_int32__local a b : int32 -> int32 -> bool) let (globalize_int32 : int32 -> int32) = (Int32.globalize : int32 -> int32) let (hash_fold_int32 : Ppx_hash_lib.Std.Hash.state -> int32 -> Ppx_hash_lib.Std.Hash.state) = Int32.hash_fold_t and (hash_int32 : int32 -> Ppx_hash_lib.Std.Hash.hash_value) = let func = Int32.hash in fun x -> func x ;; let int32_of_sexp = (Int32.t_of_sexp : Sexplib0.Sexp.t -> int32) let sexp_of_int32 = (Int32.sexp_of_t : int32 -> Sexplib0.Sexp.t) let (int32_sexp_grammar : int32 Sexplib0.Sexp_grammar.t) = Int32.t_sexp_grammar [@@@end] type int64 = Int64.t [@@deriving_inline compare ~localize, equal ~localize, globalize, hash, sexp, sexp_grammar] let compare_int64__local = (Int64.compare__local : int64 -> int64 -> int) let compare_int64 = (fun a b -> compare_int64__local a b : int64 -> int64 -> int) let equal_int64__local = (Int64.equal__local : int64 -> int64 -> bool) let equal_int64 = (fun a b -> equal_int64__local a b : int64 -> int64 -> bool) let (globalize_int64 : int64 -> int64) = (Int64.globalize : int64 -> int64) let (hash_fold_int64 : Ppx_hash_lib.Std.Hash.state -> int64 -> Ppx_hash_lib.Std.Hash.state) = Int64.hash_fold_t and (hash_int64 : int64 -> Ppx_hash_lib.Std.Hash.hash_value) = let func = Int64.hash in fun x -> func x ;; let int64_of_sexp = (Int64.t_of_sexp : Sexplib0.Sexp.t -> int64) let sexp_of_int64 = (Int64.sexp_of_t : int64 -> Sexplib0.Sexp.t) let (int64_sexp_grammar : int64 Sexplib0.Sexp_grammar.t) = Int64.t_sexp_grammar [@@@end] type 'a list = 'a List.t [@@deriving_inline compare ~localize, equal ~localize, globalize, hash, sexp, sexp_grammar] let compare_list__local : 'a. ('a -> 'a -> int) -> 'a list -> 'a list -> int = List.compare__local ;; let compare_list : 'a. ('a -> 'a -> int) -> 'a list -> 'a list -> int = List.compare let equal_list__local : 'a. ('a -> 'a -> bool) -> 'a list -> 'a list -> bool = List.equal__local ;; let equal_list : 'a. ('a -> 'a -> bool) -> 'a list -> 'a list -> bool = List.equal let globalize_list : 'a. ('a -> 'a) -> 'a list -> 'a list = fun (type a__078_) : ((a__078_ -> a__078_) -> a__078_ list -> a__078_ list) -> List.globalize ;; let hash_fold_list : 'a. (Ppx_hash_lib.Std.Hash.state -> 'a -> Ppx_hash_lib.Std.Hash.state) -> Ppx_hash_lib.Std.Hash.state -> 'a list -> Ppx_hash_lib.Std.Hash.state = List.hash_fold_t ;; let list_of_sexp : 'a. (Sexplib0.Sexp.t -> 'a) -> Sexplib0.Sexp.t -> 'a list = List.t_of_sexp ;; let sexp_of_list : 'a. ('a -> Sexplib0.Sexp.t) -> 'a list -> Sexplib0.Sexp.t = List.sexp_of_t ;; let list_sexp_grammar : 'a. 'a Sexplib0.Sexp_grammar.t -> 'a list Sexplib0.Sexp_grammar.t = fun _'a_sexp_grammar -> List.t_sexp_grammar _'a_sexp_grammar ;; [@@@end] type nativeint = Nativeint.t [@@deriving_inline compare ~localize, equal ~localize, globalize, hash, sexp, sexp_grammar] let compare_nativeint__local = (Nativeint.compare__local : nativeint -> nativeint -> int) ;; let compare_nativeint = (fun a b -> compare_nativeint__local a b : nativeint -> nativeint -> int) ;; let equal_nativeint__local = (Nativeint.equal__local : nativeint -> nativeint -> bool) let equal_nativeint = (fun a b -> equal_nativeint__local a b : nativeint -> nativeint -> bool) ;; let (globalize_nativeint : nativeint -> nativeint) = (Nativeint.globalize : nativeint -> nativeint) ;; let (hash_fold_nativeint : Ppx_hash_lib.Std.Hash.state -> nativeint -> Ppx_hash_lib.Std.Hash.state) = Nativeint.hash_fold_t and (hash_nativeint : nativeint -> Ppx_hash_lib.Std.Hash.hash_value) = let func = Nativeint.hash in fun x -> func x ;; let nativeint_of_sexp = (Nativeint.t_of_sexp : Sexplib0.Sexp.t -> nativeint) let sexp_of_nativeint = (Nativeint.sexp_of_t : nativeint -> Sexplib0.Sexp.t) let (nativeint_sexp_grammar : nativeint Sexplib0.Sexp_grammar.t) = Nativeint.t_sexp_grammar ;; [@@@end] type 'a option = 'a Option.t [@@deriving_inline compare ~localize, equal ~localize, globalize, hash, sexp, sexp_grammar] let compare_option__local : 'a. ('a -> 'a -> int) -> 'a option -> 'a option -> int = Option.compare__local ;; let compare_option : 'a. ('a -> 'a -> int) -> 'a option -> 'a option -> int = Option.compare ;; let equal_option__local : 'a. ('a -> 'a -> bool) -> 'a option -> 'a option -> bool = Option.equal__local ;; let equal_option : 'a. ('a -> 'a -> bool) -> 'a option -> 'a option -> bool = Option.equal ;; let globalize_option : 'a. ('a -> 'a) -> 'a option -> 'a option = fun (type a__109_) : ((a__109_ -> a__109_) -> a__109_ option -> a__109_ option) -> Option.globalize ;; let hash_fold_option : 'a. (Ppx_hash_lib.Std.Hash.state -> 'a -> Ppx_hash_lib.Std.Hash.state) -> Ppx_hash_lib.Std.Hash.state -> 'a option -> Ppx_hash_lib.Std.Hash.state = Option.hash_fold_t ;; let option_of_sexp : 'a. (Sexplib0.Sexp.t -> 'a) -> Sexplib0.Sexp.t -> 'a option = Option.t_of_sexp ;; let sexp_of_option : 'a. ('a -> Sexplib0.Sexp.t) -> 'a option -> Sexplib0.Sexp.t = Option.sexp_of_t ;; let option_sexp_grammar : 'a. 'a Sexplib0.Sexp_grammar.t -> 'a option Sexplib0.Sexp_grammar.t = fun _'a_sexp_grammar -> Option.t_sexp_grammar _'a_sexp_grammar ;; [@@@end] type 'a ref = 'a Ref.t [@@deriving_inline compare ~localize, equal ~localize, globalize, sexp, sexp_grammar] let compare_ref__local : 'a. ('a -> 'a -> int) -> 'a ref -> 'a ref -> int = Ref.compare__local ;; let compare_ref : 'a. ('a -> 'a -> int) -> 'a ref -> 'a ref -> int = Ref.compare let equal_ref__local : 'a. ('a -> 'a -> bool) -> 'a ref -> 'a ref -> bool = Ref.equal__local ;; let equal_ref : 'a. ('a -> 'a -> bool) -> 'a ref -> 'a ref -> bool = Ref.equal let globalize_ref : 'a. ('a -> 'a) -> 'a ref -> 'a ref = fun (type a__134_) : ((a__134_ -> a__134_) -> a__134_ ref -> a__134_ ref) -> Ref.globalize ;; let ref_of_sexp : 'a. (Sexplib0.Sexp.t -> 'a) -> Sexplib0.Sexp.t -> 'a ref = Ref.t_of_sexp ;; let sexp_of_ref : 'a. ('a -> Sexplib0.Sexp.t) -> 'a ref -> Sexplib0.Sexp.t = Ref.sexp_of_t ;; let ref_sexp_grammar : 'a. 'a Sexplib0.Sexp_grammar.t -> 'a ref Sexplib0.Sexp_grammar.t = fun _'a_sexp_grammar -> Ref.t_sexp_grammar _'a_sexp_grammar ;; [@@@end] type string = String.t [@@deriving_inline compare ~localize, equal ~localize, globalize, hash, sexp, sexp_grammar] let compare_string__local = (String.compare__local : string -> string -> int) let compare_string = (fun a b -> compare_string__local a b : string -> string -> int) let equal_string__local = (String.equal__local : string -> string -> bool) let equal_string = (fun a b -> equal_string__local a b : string -> string -> bool) let (globalize_string : string -> string) = (String.globalize : string -> string) let (hash_fold_string : Ppx_hash_lib.Std.Hash.state -> string -> Ppx_hash_lib.Std.Hash.state) = String.hash_fold_t and (hash_string : string -> Ppx_hash_lib.Std.Hash.hash_value) = let func = String.hash in fun x -> func x ;; let string_of_sexp = (String.t_of_sexp : Sexplib0.Sexp.t -> string) let sexp_of_string = (String.sexp_of_t : string -> Sexplib0.Sexp.t) let (string_sexp_grammar : string Sexplib0.Sexp_grammar.t) = String.t_sexp_grammar [@@@end] type bytes = Bytes.t [@@deriving_inline compare ~localize, equal ~localize, globalize, sexp, sexp_grammar] let compare_bytes__local = (Bytes.compare__local : bytes -> bytes -> int) let compare_bytes = (fun a b -> compare_bytes__local a b : bytes -> bytes -> int) let equal_bytes__local = (Bytes.equal__local : bytes -> bytes -> bool) let equal_bytes = (fun a b -> equal_bytes__local a b : bytes -> bytes -> bool) let (globalize_bytes : bytes -> bytes) = (Bytes.globalize : bytes -> bytes) let bytes_of_sexp = (Bytes.t_of_sexp : Sexplib0.Sexp.t -> bytes) let sexp_of_bytes = (Bytes.sexp_of_t : bytes -> Sexplib0.Sexp.t) let (bytes_sexp_grammar : bytes Sexplib0.Sexp_grammar.t) = Bytes.t_sexp_grammar [@@@end] type unit = Unit.t [@@deriving_inline compare ~localize, equal ~localize, globalize, hash, sexp, sexp_grammar] let compare_unit__local = (Unit.compare__local : unit -> unit -> int) let compare_unit = (fun a b -> compare_unit__local a b : unit -> unit -> int) let equal_unit__local = (Unit.equal__local : unit -> unit -> bool) let equal_unit = (fun a b -> equal_unit__local a b : unit -> unit -> bool) let (globalize_unit : unit -> unit) = (Unit.globalize : unit -> unit) let (hash_fold_unit : Ppx_hash_lib.Std.Hash.state -> unit -> Ppx_hash_lib.Std.Hash.state) = Unit.hash_fold_t and (hash_unit : unit -> Ppx_hash_lib.Std.Hash.hash_value) = let func = Unit.hash in fun x -> func x ;; let unit_of_sexp = (Unit.t_of_sexp : Sexplib0.Sexp.t -> unit) let sexp_of_unit = (Unit.sexp_of_t : unit -> Sexplib0.Sexp.t) let (unit_sexp_grammar : unit Sexplib0.Sexp_grammar.t) = Unit.t_sexp_grammar [@@@end] (** Format stuff *) type nonrec ('a, 'b, 'c) format = ('a, 'b, 'c) format type nonrec ('a, 'b, 'c, 'd) format4 = ('a, 'b, 'c, 'd) format4 type nonrec ('a, 'b, 'c, 'd, 'e, 'f) format6 = ('a, 'b, 'c, 'd, 'e, 'f) format6 (** List operators *) include List.Infix (** Int operators and comparisons *) include Int.O include Int_replace_polymorphic_compare (** Float operators *) include Float.O_dot (* This is declared as an external to be optimized away in more contexts. *) (** Reverse application operator. [x |> g |> f] is equivalent to [f (g (x))]. *) external ( |> ) : 'a -> (('a -> 'b)[@local_opt]) -> 'b = "%revapply" (** Application operator. [g @@ f @@ x] is equivalent to [g (f (x))]. *) external ( @@ ) : (('a -> 'b)[@local_opt]) -> 'a -> 'b = "%apply" (** Boolean operations *) (* These need to be declared as an external to get the lazy behavior *) external ( && ) : (bool[@local_opt]) -> (bool[@local_opt]) -> bool = "%sequand" external ( || ) : (bool[@local_opt]) -> (bool[@local_opt]) -> bool = "%sequor" external not : (bool[@local_opt]) -> bool = "%boolnot" (* This must be declared as an external for the warnings to work properly. *) external ignore : (_[@local_opt]) -> unit = "%ignore" (** Common string operations *) let ( ^ ) = String.( ^ ) (** Reference operations *) (* Declared as an externals so that the compiler skips the caml_modify when possible and to keep reference unboxing working *) external ( ! ) : ('a ref[@local_opt]) -> 'a = "%field0" external ref : 'a -> ('a ref[@local_opt]) = "%makemutable" external ( := ) : ('a ref[@local_opt]) -> 'a -> unit = "%setfield0" (** Pair operations *) let fst = fst let snd = snd (** Exceptions stuff *) (* Declared as an external so that the compiler may rewrite '%raise' as '%reraise'. *) external raise : exn -> _ = "%raise" let failwith = failwith let invalid_arg = invalid_arg let raise_s = Error.raise_s (** Misc *) external phys_equal : ('a[@local_opt]) -> ('a[@local_opt]) -> bool = "%eq" external force : ('a Lazy.t[@local_opt]) -> 'a = "%lazy_force" end include Export include Container_intf.Export (** @inline *) exception Not_found_s = Not_found_s (* We perform these side effects here because we want them to run for any code that uses [Base]. If this were in another module in [Base] that was not used in some program, then the side effects might not be run in that program. This will run as long as the program refers to at least one value directly in [Base]; referring to values in [Base.Bool], for example, is not sufficient. *) let () = Backtrace.initialize_module () module Caml = struct end [@@deprecated "[since 2023-01] use Stdlib instead of Caml"]
sectionYPositions = computeSectionYPositions($el), 10)"
x-init="setTimeout(() => sectionYPositions = computeSectionYPositions($el), 10)"
>