Safe Haskell | None |
---|---|
Language | Haskell2010 |
Documentation
A map based on Data.Intmap.Strict
. O(log(n)) for most operations.
data Cache (n :: Nat) s Source #
A cache around another store. Note that iterating over a cache is linear in cache size, so sparsely populated caches might actually decrease performance.
A Unique contains zero or one component.
Writing to it overwrites both the previous component and its owner.
Its main purpose is to be a Map
optimized for when only ever one component inhabits it.
A Global contains exactly one component.
Initialized with mempty
The store will return true for every existence check, but only ever gives (-1) as its inhabitant.
The entity argument is ignored when setting/getting a global.