summaryrefslogtreecommitdiff
path: root/src/Lib.hs
diff options
context:
space:
mode:
Diffstat (limited to 'src/Lib.hs')
-rw-r--r--src/Lib.hs8
1 files changed, 5 insertions, 3 deletions
diff --git a/src/Lib.hs b/src/Lib.hs
index 9748aed..695f0de 100644
--- a/src/Lib.hs
+++ b/src/Lib.hs
@@ -5,6 +5,7 @@ module Lib where
import Control.Lens (makeLenses)
import Control.Monad.Identity (Identity(..))
+import Control.Monad.IO.Class (MonadIO(..))
import Control.Monad.Reader (ReaderT(..), runReaderT)
import Control.Monad.Reader.Class (MonadReader(..))
import Control.Monad.State.Class (MonadState(..))
@@ -35,14 +36,15 @@ instance Default World where
makeLenses ''World
newtype App a = App {
- runApp :: StateT World (ReaderT Config Identity) a}
+ runApp :: StateT World (ReaderT Config IO) a}
deriving ( Applicative
, Functor
, Monad
, MonadState World
, MonadReader Config
+ , MonadIO
)
-evalApp :: App a -> World -> Config -> a
+evalApp :: App a -> World -> Config -> IO a
evalApp f world config =
- runIdentity (runReaderT (evalStateT (runApp f) world) config)
+ runReaderT (evalStateT (runApp f) world) config