package parsley

All checked builds pass
  1. Overview
  2. Docs
Parsley library

Install

dune-project
 Dependency

Authors

Maintainers

Sources

0.0.1.tar.gz
md5=69555b0223825683cbf697c3dc05965b
sha512=49abbdebf2c7fd55d198adf11f91965049126bf9dc9acd89bd170bf9ae8b264c68a46281d02e6ab8009ad1bc2c96b27c4313186a3693ca74e798abe3a1c7906b

Description

Parsley is a library that provides string to numeric values utilities (int_of_string, float_of_string ...) while indicating if a loss of precision occured during the conversion

Added to opam-repository:

README

Parsley

Parsley provides utilities to convert a string representation of an OCaml numeric value (float, int32, int64, native) to the corresponding value while indicating if a loss of precision occured during the conversion.

How?

Parsley parses the string using arbitrary precision integers and rationals (using the Zarith library) and compares the result it obtains with the one obtained by OCaml's standard of_string utilities (int_of_string, float_of_string ...)

PPX

You can use Parsley's functionnalities on your OCaml source code using the ppx that goes with the library. It generates pretty warning messages using OCaml's warning styles as in the following examples.

todo example

Dependencies

  • Zarith: https://github.com/ocaml/Zarith

Compatibility:

  • OCaml >= 4.08

Dependencies (3)

  1. zarith
  2. dune >= "1.11"
  3. ocaml >= "4.08.0"

Dev Dependencies

None

Used by

None

Conflicts

None

Build status

Results of building parsley with each compiler on check.ci.ocaml.org, run of against opam-repository 7cdc698. All results for this package.

Each result links to its build log. To keep crawlers from overloading the site, build logs require a GitHub sign-in (see ocurrent/opam-health-check). On your first log, GitHub asks you to “Authorize opam-health-check”, the OCurrent app that runs these checks; it sees only your public profile, not your repositories. The sign-in lasts 30 days.

Version OCaml 4.11 OCaml 4.14 OCaml 5.2 OCaml 5.4 OCaml 5.5
0.0.1 (this version) good good good good good
  • good Package successfully built
  • partial One of the dependencies failed to build
  • bad Package failed to build
  • n/a Package is not available in this environment
  • internal Internal failure