Safe Haskell | None |
---|---|
Language | Haskell2010 |
LiveCoding.Gloss.PictureM
Synopsis
- type PictureM = PictureT IO
- type PictureT (m :: Type -> Type) = ReaderT [Event] (WriterT Picture m)
- runPictureT :: forall (m :: Type -> Type) a b. Monad m => Cell (PictureT m) a b -> Cell m ([Event], a) (Picture, b)
- addPicture :: forall (m :: Type -> Type). Monad m => Cell (PictureT m) Picture ()
- module Control.Monad.Trans.Reader
Documentation
type PictureT (m :: Type -> Type) = ReaderT [Event] (WriterT Picture m) Source #
The monad transformer that captures the effects of gloss, which are reading events and writing pictures.
You can call these effects for example by...
- ...using
ask
to read the events that occurred, - ...composing a cell with
addPicture
to paint a picture.
runPictureT :: forall (m :: Type -> Type) a b. Monad m => Cell (PictureT m) a b -> Cell m ([Event], a) (Picture, b) Source #
Run the effects of the gloss monad stack by explicitly passing events and pictures.
module Control.Monad.Trans.Reader