package index

  1. Overview
  2. Docs
A platform-agnostic multi-level index for OCaml

Install

dune-project
 Dependency

Authors

Maintainers

Sources

index-1.6.0.tbz
sha256=5e0c1f6cbd6e485cbbf2344c8f76de8a7869155355ae6edd5550c88da0661594
sha512=613fa206d1124b34259421f4ea978ce4e9404d78af3a687c1e406d88a5d481bd51465fafae58da9eb3e6a0b5408118b8a7dfe1fbb05ce8fed4b8b0a572beb99b

doc/src/index/import.ml.html

Source file import.ml

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
module Int63 = struct
  include Optint.Int63

  let ( + ) = add
  let ( - ) = sub
  let ( * ) = mul
  let ( / ) = div

  let to_int_exn =
    let max_int = of_int Int.max_int in
    fun x ->
      if compare x max_int > 0 then
        Fmt.failwith "Int63.to_int_exn: %a too large" pp x
      else to_int x

  let to_int_trunc = to_int
  let to_int = `shadowed
end

type int63 = Int63.t [@@deriving repr]
OCaml

Innovation. Community. Security.