minilight-0.1.0: A SDL2-based graphics library, batteries-included.

Safe HaskellNone
LanguageHaskell2010

MiniLight.Light

Contents

Synopsis

Documentation

class Monad m => MonadIO (m :: Type -> Type) where #

Monads in which IO computations may be embedded. Any monad built by applying a sequence of monad transformers to the IO monad will be an instance of this class.

Instances should satisfy the following laws, which state that liftIO is a transformer of monads:

Methods

liftIO :: IO a -> m a #

Lift a computation from the IO monad.

Instances
MonadIO IO

Since: base-4.9.0.0

Instance details

Defined in Control.Monad.IO.Class

Methods

liftIO :: IO a -> IO a #

MonadIO Q 
Instance details

Defined in Language.Haskell.TH.Syntax

Methods

liftIO :: IO a -> Q a #

MonadIO m => MonadIO (ListT m) 
Instance details

Defined in Control.Monad.Trans.List

Methods

liftIO :: IO a -> ListT m a #

MonadIO m => MonadIO (MaybeT m) 
Instance details

Defined in Control.Monad.Trans.Maybe

Methods

liftIO :: IO a -> MaybeT m a #

MonadIO m => MonadIO (ResourceT m) 
Instance details

Defined in Control.Monad.Trans.Resource.Internal

Methods

liftIO :: IO a -> ResourceT m a #

MonadIO m => MonadIO (IdentityT m) 
Instance details

Defined in Control.Monad.Trans.Identity

Methods

liftIO :: IO a -> IdentityT m a #

(Error e, MonadIO m) => MonadIO (ErrorT e m) 
Instance details

Defined in Control.Monad.Trans.Error

Methods

liftIO :: IO a -> ErrorT e m a #

MonadIO m => MonadIO (ExceptT e m) 
Instance details

Defined in Control.Monad.Trans.Except

Methods

liftIO :: IO a -> ExceptT e m a #

MonadIO m => MonadIO (ReaderT r m) 
Instance details

Defined in Control.Monad.Trans.Reader

Methods

liftIO :: IO a -> ReaderT r m a #

MonadIO m => MonadIO (StateT s m) 
Instance details

Defined in Control.Monad.Trans.State.Lazy

Methods

liftIO :: IO a -> StateT s m a #

MonadIO m => MonadIO (StateT s m) 
Instance details

Defined in Control.Monad.Trans.State.Strict

Methods

liftIO :: IO a -> StateT s m a #

(Monoid w, MonadIO m) => MonadIO (WriterT w m) 
Instance details

Defined in Control.Monad.Trans.Writer.Lazy

Methods

liftIO :: IO a -> WriterT w m a #

(Monoid w, MonadIO m) => MonadIO (WriterT w m) 
Instance details

Defined in Control.Monad.Trans.Writer.Strict

Methods

liftIO :: IO a -> WriterT w m a #

(Monoid w, Functor m, MonadIO m) => MonadIO (AccumT w m) 
Instance details

Defined in Control.Monad.Trans.Accum

Methods

liftIO :: IO a -> AccumT w m a #

MonadIO m => MonadIO (SelectT r m) 
Instance details

Defined in Control.Monad.Trans.Select

Methods

liftIO :: IO a -> SelectT r m a #

(Functor f, MonadIO m) => MonadIO (FreeT f m) 
Instance details

Defined in Control.Monad.Trans.Free

Methods

liftIO :: IO a -> FreeT f m a #

MonadIO m => MonadIO (LightT env m) Source # 
Instance details

Defined in MiniLight.Light

Methods

liftIO :: IO a -> LightT env m a #

MonadIO m => MonadIO (ContT r m) 
Instance details

Defined in Control.Monad.Trans.Cont

Methods

liftIO :: IO a -> ContT r m a #

MonadIO m => MonadIO (ParsecT s u m) 
Instance details

Defined in Text.Parsec.Prim

Methods

liftIO :: IO a -> ParsecT s u m a #

MonadIO m => MonadIO (ConduitT i o m) 
Instance details

Defined in Data.Conduit.Internal.Conduit

Methods

liftIO :: IO a -> ConduitT i o m a #

(Monoid w, MonadIO m) => MonadIO (RWST r w s m) 
Instance details

Defined in Control.Monad.Trans.RWS.Lazy

Methods

liftIO :: IO a -> RWST r w s m a #

(Monoid w, MonadIO m) => MonadIO (RWST r w s m) 
Instance details

Defined in Control.Monad.Trans.RWS.Strict

Methods

liftIO :: IO a -> RWST r w s m a #

MonadIO m => MonadIO (Pipe l i o u m) 
Instance details

Defined in Data.Conduit.Internal.Pipe

Methods

liftIO :: IO a -> Pipe l i o u m a #

class HasLightEnv env where Source #

Methods

rendererL :: Lens' env Renderer Source #

fontCacheL :: Lens' env FontMap Source #

Instances
HasLightEnv LightEnv Source # 
Instance details

Defined in MiniLight.Light

Methods

rendererL :: Lens' LightEnv Renderer Source #

fontCacheL :: Lens' LightEnv FontMap Source #

newtype LightT env m a Source #

Constructors

LightT 

Fields

Instances
Rendering Figure MiniLight Source # 
Instance details

Defined in MiniLight.Figure

Monad m => MonadReader env (LightT env m) Source # 
Instance details

Defined in MiniLight.Light

Methods

ask :: LightT env m env #

local :: (env -> env) -> LightT env m a -> LightT env m a #

reader :: (env -> a) -> LightT env m a #

Monad m => Monad (LightT env m) Source # 
Instance details

Defined in MiniLight.Light

Methods

(>>=) :: LightT env m a -> (a -> LightT env m b) -> LightT env m b #

(>>) :: LightT env m a -> LightT env m b -> LightT env m b #

return :: a -> LightT env m a #

fail :: String -> LightT env m a #

Functor m => Functor (LightT env m) Source # 
Instance details

Defined in MiniLight.Light

Methods

fmap :: (a -> b) -> LightT env m a -> LightT env m b #

(<$) :: a -> LightT env m b -> LightT env m a #

Applicative m => Applicative (LightT env m) Source # 
Instance details

Defined in MiniLight.Light

Methods

pure :: a -> LightT env m a #

(<*>) :: LightT env m (a -> b) -> LightT env m a -> LightT env m b #

liftA2 :: (a -> b -> c) -> LightT env m a -> LightT env m b -> LightT env m c #

(*>) :: LightT env m a -> LightT env m b -> LightT env m b #

(<*) :: LightT env m a -> LightT env m b -> LightT env m a #

MonadIO m => MonadIO (LightT env m) Source # 
Instance details

Defined in MiniLight.Light

Methods

liftIO :: IO a -> LightT env m a #

MonadCatch m => MonadCatch (LightT env m) Source # 
Instance details

Defined in MiniLight.Light

Methods

catch :: Exception e => LightT env m a -> (e -> LightT env m a) -> LightT env m a

MonadMask m => MonadMask (LightT env m) Source # 
Instance details

Defined in MiniLight.Light

Methods

mask :: ((forall a. LightT env m a -> LightT env m a) -> LightT env m b) -> LightT env m b

uninterruptibleMask :: ((forall a. LightT env m a -> LightT env m a) -> LightT env m b) -> LightT env m b

generalBracket :: LightT env m a -> (a -> ExitCase b -> LightT env m c) -> (a -> LightT env m b) -> LightT env m (b, c)

MonadThrow m => MonadThrow (LightT env m) Source # 
Instance details

Defined in MiniLight.Light

Methods

throwM :: Exception e => e -> LightT env m a

data LightEnv Source #

Constructors

LightEnv 

Fields

envLightT :: (env' -> env) -> LightT env m a -> LightT env' m a Source #

mapLightT :: (m a -> n a) -> LightT env m a -> LightT env n a Source #

loadFontCache :: MonadIO m => m FontMap Source #

loadFont :: (HasLightEnv env, MonadIO m) => FontDescriptor -> Int -> LightT env m Font Source #

withFont :: (HasLightEnv env, MonadIO m, MonadMask m) => FontDescriptor -> Int -> (Font -> LightT env m a) -> LightT env m a Source #

Orphan instances

Hashable FontDescriptor Source # 
Instance details