Add MonadActive instances

This commit is contained in:
Michael Snoyman 2014-07-30 11:33:38 +03:00
parent 8f2e84fa0a
commit 05d31d6621
2 changed files with 11 additions and 1 deletions

View File

@ -68,6 +68,9 @@ import Yesod.Routes.Class (RenderRoute (..), ParseRout
import Control.Monad.Reader (MonadReader (..))
import Prelude hiding (catch)
import Control.DeepSeq (NFData (rnf))
#if MIN_VERSION_conduit(1, 1, 0)
import Data.Conduit.Lazy (MonadActive, monadActive)
#endif
-- Sessions
type SessionMap = Map Text ByteString
@ -458,6 +461,13 @@ instance MonadIO m => MonadLogger (WidgetT site m) where
monadLoggerLog a b c d = WidgetT $ \hd ->
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
lift = HandlerT . const

View File

@ -1,5 +1,5 @@
name: yesod-core
version: 1.2.18
version: 1.2.19
license: MIT
license-file: LICENSE
author: Michael Snoyman <michael@snoyman.com>