package jane_rope
All checked builds passInstall
dune-project
Dependency
Authors
Maintainers
Sources
sha256=3174a58e3ad8f2652ad569e9b8a5be03d2e173c955e422fdc870ec929144cdd0
Description
Added to opam-repository:
README
"Rope"
A rope is a standard data structure that represents a single string as a tree of strings, allowing concatenation to do no work up front.
That is, a string formed by many Rope concatenations followed by a to_string needs only copy each input to the output once, whereas a string expression looking like a ^ b ^ c ^ ... ^ z must create an intermediate string for every concatenation, and will copy the original data into and out of short-lived temporary strings many times.
On the other hand, because String.concat [ s1; s2; s3; ... ] allocates a single string and copies the inputs into it, Rope is no improvement over that usage. Rope becomes useful when the construction of the sequence of strings is more complex -- a good example is prettyprinting an expression language, where you need to parenthesize subexpressions (appending a short string at both ends) and handle infix binary operators (appending two long strings both made up of many parts, with a short string in between).
Any operations that would produce a Rope longer than String.max_length raise instead. They are not marked with _exn on their names since (at least on 64-bit) this number is far in excess of the size of your memory, so isn't likely to come up in practice.
A more fully-featured implementation of the same idea is available in the zed library.
Dependencies (4)
Dev Dependencies
None
Optional Dependencies
None
Used by (2)
-
re2
>= "v0.17.0" -
shuttle_http
>= "0.10.0"
Conflicts
None
Build status
Results of building jane_rope with each compiler on check.ci.ocaml.org, run of against opam-repository 8a77e58. 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 |
|---|---|---|---|---|---|
| v0.17.0 (this version) | n/a | n/a | good | good | good |
| v0.16.0 | n/a | good | good | n/a | n/a |
- 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