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

Data.Aztecs.Command

Synopsis

Documentation

newtype Command m a Source #

Command to update the World.

Constructors

Command (StateT World m a) 

Instances

Instances details
MonadIO m => MonadIO (Command m) Source # 
Instance details

Defined in Data.Aztecs.Command

Methods

liftIO :: IO a -> Command m a #

Monad m => Applicative (Command m) Source # 
Instance details

Defined in Data.Aztecs.Command

Methods

pure :: a -> Command m a #

(<*>) :: Command m (a -> b) -> Command m a -> Command m b #

liftA2 :: (a -> b -> c) -> Command m a -> Command m b -> Command m c #

(*>) :: Command m a -> Command m b -> Command m b #

(<*) :: Command m a -> Command m b -> Command m a #

Functor m => Functor (Command m) Source # 
Instance details

Defined in Data.Aztecs.Command

Methods

fmap :: (a -> b) -> Command m a -> Command m b #

(<$) :: a -> Command m b -> Command m a #

Monad m => Monad (Command m) Source # 
Instance details

Defined in Data.Aztecs.Command

Methods

(>>=) :: Command m a -> (a -> Command m b) -> Command m b #

(>>) :: Command m a -> Command m b -> Command m b #

return :: a -> Command m a #

spawn :: (Component a, Typeable a) => a -> Command IO Entity Source #

Spawn a Component and return its Entity.

insert :: (Component a, Typeable a) => Entity -> a -> Command IO () Source #

Insert a Component into an Entity.

data Edit where Source #

Constructors

Spawn :: Component c => Entity -> Proxy c -> Edit 
Insert :: Component c => Entity -> Proxy c -> Edit