diff options
author | Raúl Benencia <rul@kalgan.cc> | 2013-08-25 00:59:04 -0300 |
---|---|---|
committer | Raúl Benencia <rul@kalgan.cc> | 2013-08-25 00:59:04 -0300 |
commit | 56dce7c4feada1d4ca93a312e48813fb1918b93b (patch) | |
tree | 0b49a6b2c9adefa0d3d6f989a84bfd654f9d1578 /Lazymail.hs | |
parent | 4728bb04b2f5daff7a2ed8c30dd0fd8a8ee9539b (diff) |
advancing in the monads transformers implementation
Diffstat (limited to 'Lazymail.hs')
-rw-r--r-- | Lazymail.hs | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/Lazymail.hs b/Lazymail.hs index 70a6b96..33a9c11 100644 --- a/Lazymail.hs +++ b/Lazymail.hs @@ -11,8 +11,8 @@ module Lazymail where import Control.Monad.Reader import Control.Monad.State -import Config(LazymailConfig, customConfig) -import State(LazymailState, initialState) +import Config +import State {- Lazymail monad is a ReaderT around a StateT with IO at the bottom of the - stack. @@ -22,5 +22,5 @@ type Lazymail = ReaderT LazymailConfig (StateT LazymailState IO) run :: Lazymail a -> IO (a, LazymailState) run k = let config = customConfig - state = initialState + state = initialState { basePath = initialPath config } in runStateT (runReaderT k config) state
\ No newline at end of file |