package quick_print
All checked builds passInstall
dune-project
Dependency
Authors
Maintainers
Sources
md5=e6d2e0d5d4e217a6fd46f06cd64d2177
sha512=f2d70d76969f286fc55d01750c658db0288e094a63a64c89a9f31663e63a288361ed9a2f480928b65092e89858b66249b242cbbf53bc76b2f9bba09646af2722
Description
Allows quick printing for lists, arrays, Hashtables etc. Useful for learning/ quick debugging
README
quick_print
quick_print is an OCaml library that allows quick and easy pretty-printing of lists, arrays, Hashtables and more. Its main goal is to simplify data visualization during learning and debugging.
Installation
Install quick_print with OPAM:
opam install quick_printUsage
Quick_print.x where x = the type of data structure, currently simple lists/arrays and many hashtables are supported.
Optional (prefix) prints same line before data structure.
Optional (precision) on float data types gives decimal precision.
ex: 1.2345 with ~precision:1 -> 1.2, ~precision:2 -> 1.23 etc. defaults to 2.
Quick_print.strings_list ~prefix:"string_list: "
[ "hello"; "world"; "my"; "name"; "is" ]; (* output: string_list: [hello; world; my; name; is] *)
let ht = Hashtbl.create 3 in
Hashtbl.add ht 1 [1.1234; 2.1235; 3.23456];
Hashtbl.add ht 2 [4.98765; 5.87654; 6.76543];
Hashtbl.add ht 3 [7.1; 8.01; 9.001];
Quick_print.hashtable_int_float_list ~prefix:"MyHashTable: " ~precision:2 ht
(* output: MyHashTable: {(1, [1.12; 2.12; 3.23]); (2, [4.99; 5.88; 6.77]); (3, [7.10; 8.01; 9.00]); } *)Contribute
Contributions to quick_print are welcome. Feel free to submit issues and pull requests.
License
This project is licensed under the terms of the MIT license. For more details, see the LICENSE file.
Dev Dependencies (1)
-
odoc
with-doc
Optional Dependencies
None
Used by
None
Conflicts
None
Build status
Results of building quick_print 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.12 (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