package ambient-context-lwt

  1. Overview
  2. Docs
Storage backend for ambient-context using Lwt's sequence-associated storage

Install

dune-project
 Dependency

Authors

Maintainers

Sources

ambient-context-0.2.tbz
sha256=f451f4ed467ef0c15f472cda1021a89e96afdf3a32970ea047faf057a01c72d3
sha512=3115fd7b45ac171f7a971013dd6f32ec317fc274d800a86870a0dd43574e27b404090fbc51dae5e4c8af4961d706f84abf3843a6cf8dc57f711211cd2b547780

doc/CHANGES.html

0.2.0

Breaking changes:

  • Simplified API with renamed functions:

    • create_key()new_key()
    • with_bindingwith_key_bound_to
    • without_bindingwith_key_unbound
    • set_storage_providerset_current_storage
  • Storage type changed from first-class module to record:

    • Old: type storage = (module STORAGE)
    • New: Storage.t record type
  • Key type simplified:

    • Old: type 'a key = int * 'a Hmap.key
    • New: type 'a key = 'a Hmap.key

Migration guide:

(* Old code *)
let k = Ctx.create_key () in
Ctx.set_storage_provider (Ambient_context_lwt.storage ()) ;
Ctx.with_binding k "value" @@ fun () -> ...

(* New code *)
let k = Ctx.new_key () in
Ctx.set_current_storage Ambient_context_lwt.storage ;
Ctx.with_key_bound_to k "value" @@ fun () -> ...

0.1.1

re-release after github broke the release archive, this time using dune-release to avoid it in the future