package parsley

  1. Overview
  2. Docs
Parsley library

Install

Dune 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

Published: 12 Nov 2019

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