package checked_oint

  1. Overview
  2. Docs
An OCaml library for checked integer arithmetic

Install

Dune Dependency

Authors

Maintainers

Sources

v0.2.1.tar.gz
md5=79c7b1b3d9aadaafa0e22b8803697875
sha512=9a1da14a0473a8354dd8bfc376d4e49c111f58c471683745606c41b80b04d89bdacce0c51d1e83534431bd15d67fa1a9ac354c9d2182d10a0e19a3dc475a1b21

Description

Published: 17 Oct 2024

README

checked_oint

checked_oint is an OCaml library for checked integer arithmetic. We support the full set of signed and unsigned integers of bitnesses 8, 16, 32, 64, and 128.

Installation

$ opam install checked_oint

Usage

open Checked_oint

let () =
  let x = U8.of_int_exn 50 in
  let y = U8.of_int_exn 70 in
  assert (U8.equal (U8.add_exn x y) (U8.of_int_exn 120));
  assert (Option.is_none (U8.mul x y))

You can find the API documentation here.

Release procedure

  1. Update the version field in dune-project.

  2. Type dune build to generate checked_oint.opam.

  3. Update CHANGELOG.md.

  4. Release the project in GitHub Releases.

  5. Type git pull && opam publish.

Dev Dependencies (1)

  1. odoc with-doc

Used by (1)

  1. mazeppa

Conflicts

None

OCaml

Innovation. Community. Security.