package timed
All checked builds passInstall
dune-project
Dependency
Authors
Maintainers
Sources
md5=06106626006450f41f0c4d4fcbcf95d0
sha512=b136d79e6ad1a50c811acadc0ae0be049f2dc0d6fc87d233400d602cdf8c6dab3af87557e8f8d740f6eba4b87b9d5b2fcc7e550d24e4ba8c03237573da5623d5
Description
Timed references for imperative state. This module provides an alternative type for references (or mutable cells) supporting undo/redo operations. In particular, an abstract notion of time is used to capture the state of the references at any given point, so that it can be restored. Note that usual reference operations only have a constant time / memory overhead (compared to those of the standard library).
Moreover, we provide an alternative implementation based on the references of the standard library (Pervasives module). However, it is less efficient than the first one.
Added to opam-repository:
README
Timed references for imperative state
This minimal library allows the encapsulation of reference updates in an abstract notion of state. It can be used to emulate a pure interface while working with references.
Authors: Rodolphe Lepigre & Christophe Raffalli
Installation
The library has no dependency, but it is built using dune. You can use the following commands to compile and install.
make
make installExample
open Timed
let _ =
let r1 = ref 0 in
let r2 = ref 42 in
let t1 = Time.save () in
r1 := 73;
let t2 = Time.save () in
Time.restore t1;
assert(!r1 = 0 && !r2 = 42)
r1 := 17;
Time.restore t2;
assert(!r1 = 73 && !r2 = 42)
Dev Dependencies (1)
-
odoc
with-doc
Optional Dependencies
None
Used by (1)
Conflicts
None
Build status
Results of building timed 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 |
|---|---|---|---|---|---|
| 1.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