packages feed

gore-and-ash-sdl 2.0.0.0 → 2.1.0.0

raw patch · 2 files changed

+13/−3 lines, 2 filesdep +resourcetdep +transformers-base

Dependencies added: resourcet, transformers-base

Files

gore-and-ash-sdl.cabal view
@@ -1,5 +1,5 @@ name:                gore-and-ash-sdl-version:             2.0.0.0+version:             2.1.0.0 synopsis:            Gore&Ash core module for integration with SDL library description:         Please see README.md homepage:            git@github.com:Teaspot-Studio/gore-and-ash-sdl.git@@ -28,9 +28,11 @@                      , lens >= 4.13                      , linear >= 1.20.3                      , mtl >= 2.2.1+                     , resourcet >= 1.1.7.1                      , sdl2 >= 2.1.1                      , text >= 1.2.2.0                      , transformers >= 0.4.2.0+                     , transformers-base >= 0.4.4                      , unordered-containers >= 0.2.5.1                         default-extensions:    
src/Game/GoreAndAsh/SDL/Module.hs view
@@ -15,15 +15,17 @@     SDLT(..)   ) where +import Control.Monad.Base  import Control.Monad.Catch+import Control.Monad.Error.Class  import Control.Monad.Fix  import Control.Monad.IO.Class  import Control.Monad.State.Strict+import Control.Monad.Trans.Resource import Data.Proxy  import qualified Data.Foldable as F  import qualified Data.HashMap.Strict as H  import qualified Data.Sequence as S - import SDL  import Game.GoreAndAsh@@ -48,8 +50,14 @@ -- -- The module is NOT pure within first phase (see 'ModuleStack' docs), therefore currently only 'IO' end monad can handler the module. newtype SDLT s m a = SDLT { runSDLT :: StateT (SDLState s) m a }-  deriving (Functor, Applicative, Monad, MonadState (SDLState s), MonadFix, MonadTrans, MonadIO, MonadThrow, MonadCatch, MonadMask)+  deriving (Functor, Applicative, Monad, MonadState (SDLState s), MonadFix, MonadTrans, MonadIO, MonadThrow, MonadCatch, MonadMask, MonadError e) +instance MonadBase IO m => MonadBase IO (SDLT s m) where +  liftBase = SDLT . liftBase++instance MonadResource m => MonadResource (SDLT s m) where +  liftResourceT = SDLT . liftResourceT+   instance GameModule m s => GameModule (SDLT s m) (SDLState s) where    type ModuleState (SDLT s m) = SDLState s   runModule (SDLT m) s = do