aztecs-0.2.0.0: A type-safe and friendly ECS for Haskell
Safe HaskellSafe-Inferred
LanguageHaskell2010

Data.Aztecs.Query

Synopsis

Documentation

newtype Query a Source #

Query into the World.

Constructors

Query 

(<?>) :: (Split a (ConcatT a b), SplitT a (ConcatT a b) ~ b) => Query a -> Query b -> Query (ConcatT a b) Source #

fetch :: forall a. (Component a, Typeable (StorageT a)) => Query '[a] Source #

all :: forall m a. (Monad m, ToEntity a, FromEntity a, ToQuery (EntityT a)) => Access m [a] Source #

map :: forall m i o. (Monad m, FromEntity i, ToEntity o, Intersect (EntityT i) (EntityT o), ToQuery (IntersectT (EntityT i) (EntityT o)), Difference (EntityT i) (EntityT o), ToQuery (DifferenceT (EntityT i) (EntityT o)), ConcatT (DifferenceT (EntityT i) (EntityT o)) (IntersectT (EntityT i) (EntityT o)) ~ EntityT i, IntersectT (EntityT i) (EntityT o) ~ EntityT o) => (i -> o) -> Access m [o] Source #

mapWorld :: forall i o. (FromEntity i, ToEntity o, Intersect (EntityT i) (EntityT o), ToQuery (IntersectT (EntityT i) (EntityT o)), Difference (EntityT i) (EntityT o), ToQuery (DifferenceT (EntityT i) (EntityT o)), ConcatT (DifferenceT (EntityT i) (EntityT o)) (IntersectT (EntityT i) (EntityT o)) ~ EntityT i, IntersectT (EntityT i) (EntityT o) ~ EntityT o) => (i -> o) -> World -> ([o], World) Source #

mapWith :: (FromEntity i, ToEntity o, EntityT i ~ ConcatT a b, EntityT o ~ b) => Query a -> Query b -> (i -> o) -> World -> ([o], World) Source #