Safe Haskell | None |
---|
Game.LambdaHack.Kind
Description
General content types and operations.
- data Id c
- data family Speedup a
- data Ops a = Ops {}
- data COps = COps {}
- createOps :: forall a. Show a => CDefs a -> Ops a
- data Array i c
- (!) :: Ix i => Array i c -> i -> Id c
- (//) :: Ix i => Array i c -> [(i, Id c)] -> Array i c
- listArray :: Ix i => (i, i) -> [Id c] -> Array i c
- array :: Ix i => (i, i) -> [(i, Id c)] -> Array i c
- bounds :: Ix i => Array i c -> (i, i)
General content types
Content identifiers for the content type c
.
Type family for auxiliary data structures for speeding up content operations.
Content operations for the content of type a
.
Constructors
Ops | |
Fields
|
Operations for all content types, gathered together.
Constructors
COps | |
createOps :: forall a. Show a => CDefs a -> Ops aSource
Create content operations for type a
from definition of content
of type a
.
Arrays of content identifiers
Arrays, indexed by type i
of content identifiers pointing to
content type c
, where the identifiers are represented as Word8
(and so content of type c
can have at most 256 elements).
(//) :: Ix i => Array i c -> [(i, Id c)] -> Array i cSource
Construct a content identifiers array updated with the association list.
listArray :: Ix i => (i, i) -> [Id c] -> Array i cSource
Create a content identifiers array from a list of elements.