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.
ExplMembers s => ExplMembers (Cache n s) Source # | |
ExplDestroy s => ExplDestroy (Cache n s) Source # | |
ExplSet s => ExplSet (Cache n s) Source # | |
ExplGet s => ExplGet (Cache n s) Source # | |
(ExplInit s, KnownNat n, Cachable s) => ExplInit (Cache n s) Source # | |
(KnownNat n, Cachable s) => Cachable (Cache n s) Source # | |
type Elem (Cache n s) Source # | |
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.