| Safe Haskell | None |
|---|---|
| Language | Haskell2010 |
Apecs.Stores
- data Map c
- data Set c
- class Flag c where
- data Cache n s
- data Global c
- data IndexTable s
- class Bounded a => ToIndex a where
- newtype ByIndex a = ByIndex Int
- newtype ByComponent c = ByComponent c
Documentation
A map from Data.Intmap.Strict. O(n log(n)) for most operations.
Yields safe runtime representations of type Maybe c.
A store that keeps membership, but holds no values.
Produces flag runtime values.
Class for flags, used by Set to yield runtime representations.
Minimal complete definition
A cache around another store. The wrapped store must produce safe representations using Maybe. Note that iterating over a cache is linear in its size, so large, sparsely populated caches will actually decrease performance.
Instances
Global value. Must be given an initial value upon construction.
data IndexTable s Source #
A table that keeps a hashtable of indices along with its writes. TODO: Benchmark? hashing function as argument?
Instances
| ((~) * (SafeRW s) (Maybe (Stores s)), ToIndex (Stores s), Store s) => Store (IndexTable s) Source # | |
| ((~) * (SafeRW s) (Maybe (Stores s)), ToIndex (Stores s), Store s) => HasMembers (IndexTable s) Source # | |
| (ToIndex (Stores s), Initializable s) => Initializable (IndexTable s) Source # | |
| ((~) * (Stores s) c, ToIndex (Stores s)) => Query (ByComponent c) (IndexTable s) Source # | |
| ((~) * (Stores s) c, ToIndex (Stores s)) => Query (ByIndex c) (IndexTable s) Source # | |
| type SafeRW (IndexTable s) Source # | |
| type Stores (IndexTable s) Source # | |
| type InitArgs (IndexTable s) Source # | |
class Bounded a => ToIndex a where Source #
A component that can be hashed to a table index. minBound must hash to the lowest possible value, maxBound must hash to the highest. For Enums, toIndex = fromEnum
Minimal complete definition
A query to an IndexTable by an explicit index
newtype ByComponent c Source #
A query to an IndexTable by a reference component
Constructors
| ByComponent c |
Instances
| ((~) * (Stores s) c, ToIndex (Stores s)) => Query (ByComponent c) (IndexTable s) Source # | |