Monorepo management for opam overlays
0
fork

Configure Feed

Select the types of activity you want to include in your feed.

monopam: fix Remote_cache.mli MDX example

The doc example referenced [Remote_cache.X] directly, but mdx compiles
the block against [Monopam] (the wrapping library), so the unqualified
module was unbound. Open [Monopam] inside the block.

+1 -6
+1 -6
lib/remote_cache.mli
··· 20 20 {2 Example with mock time} 21 21 22 22 {[ 23 + let open Monopam in 23 24 let time = ref 0.0 in 24 25 let now () = !time in 25 26 let cache = Remote_cache.v ~ttl:60.0 ~now () in 26 - 27 - (* Set a value *) 28 27 let url = Uri.of_string "https://github.com/ocaml/ocaml.git" in 29 28 Remote_cache.set cache ~url ~branch:"trunk" ~hash:"abc123"; 30 - 31 - (* Get it back immediately *) 32 29 assert (Remote_cache.find cache ~url ~branch:"trunk" = Some "abc123"); 33 - 34 - (* Advance time past TTL *) 35 30 time := 61.0; 36 31 assert (Remote_cache.find cache ~url ~branch:"trunk" = None) 37 32 ]} *)