The surface: (pool-new T), (insert p x) answering a handle, (resolve p h) answering (Option (Ptr T)), (release p h) answering whether this call was the one that released it, (len p) and (live p), and (pool-handle p i) for enumeration. free extends to the pool and refuses a handle by name, because a handle owns nothing and consuming one copy would say nothing about the others. resolve answers a pointer rather than a value because spec-memory.md's own worked example does, and says why a line above it: a pattern binding binds a value, and a copy cannot be written back. test/programs/handles.flan prints <handle 1:1> and <handle 1:3> for the same slot before and after a death, and the projectile still holding the first gets -1 rather than the newcomer's 99.
Description
Languages
OCaml
67.2%
Emacs Lisp
15.2%
C
10.4%
HTML
2.9%
Standard ML
2.8%
Other
1.5%