Add MonadActive instances
This commit is contained in:
parent
8f2e84fa0a
commit
05d31d6621
@ -68,6 +68,9 @@ import Yesod.Routes.Class (RenderRoute (..), ParseRout
|
|||||||
import Control.Monad.Reader (MonadReader (..))
|
import Control.Monad.Reader (MonadReader (..))
|
||||||
import Prelude hiding (catch)
|
import Prelude hiding (catch)
|
||||||
import Control.DeepSeq (NFData (rnf))
|
import Control.DeepSeq (NFData (rnf))
|
||||||
|
#if MIN_VERSION_conduit(1, 1, 0)
|
||||||
|
import Data.Conduit.Lazy (MonadActive, monadActive)
|
||||||
|
#endif
|
||||||
|
|
||||||
-- Sessions
|
-- Sessions
|
||||||
type SessionMap = Map Text ByteString
|
type SessionMap = Map Text ByteString
|
||||||
@ -458,6 +461,13 @@ instance MonadIO m => MonadLogger (WidgetT site m) where
|
|||||||
monadLoggerLog a b c d = WidgetT $ \hd ->
|
monadLoggerLog a b c d = WidgetT $ \hd ->
|
||||||
liftIO $ fmap (, mempty) $ rheLog (handlerEnv hd) a b c (toLogStr d)
|
liftIO $ fmap (, mempty) $ rheLog (handlerEnv hd) a b c (toLogStr d)
|
||||||
|
|
||||||
|
#if MIN_VERSION_conduit(1, 1, 0)
|
||||||
|
instance MonadActive m => MonadActive (WidgetT site m) where
|
||||||
|
monadActive = lift monadActive
|
||||||
|
instance MonadActive m => MonadActive (HandlerT site m) where
|
||||||
|
monadActive = lift monadActive
|
||||||
|
#endif
|
||||||
|
|
||||||
instance MonadTrans (HandlerT site) where
|
instance MonadTrans (HandlerT site) where
|
||||||
lift = HandlerT . const
|
lift = HandlerT . const
|
||||||
|
|
||||||
|
|||||||
@ -1,5 +1,5 @@
|
|||||||
name: yesod-core
|
name: yesod-core
|
||||||
version: 1.2.18
|
version: 1.2.19
|
||||||
license: MIT
|
license: MIT
|
||||||
license-file: LICENSE
|
license-file: LICENSE
|
||||||
author: Michael Snoyman <michael@snoyman.com>
|
author: Michael Snoyman <michael@snoyman.com>
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user