Safe Haskell | None |
---|---|
Language | Haskell2010 |
- 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.
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.
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?
((~) * (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
A query to an IndexTable by an explicit index
newtype ByComponent c Source #
A query to an IndexTable by a reference component
((~) * (Stores s) c, ToIndex (Stores s)) => Query (ByComponent c) (IndexTable s) Source # | |