unliftio-core 0.2

This commit is contained in:
Michael Snoyman 2020-03-01 11:00:36 +02:00
parent b4c613f766
commit 9d0c9180b9
No known key found for this signature in database
GPG Key ID: 907EAE2F42B52046
3 changed files with 12 additions and 11 deletions

View File

@ -1,5 +1,9 @@
# ChangeLog for yesod-core
## 1.6.17.3
* Support for `unliftio-core` 0.2
## 1.6.17.2
* Support template-haskell 2.16, build with GHC 8.10 [#1657](https://github.com/yesodweb/yesod/pull/1657)

View File

@ -55,7 +55,7 @@ import Control.Monad.Reader (MonadReader (..))
import Control.DeepSeq (NFData (rnf))
import Yesod.Core.TypeCache (TypeMap, KeyedTypeMap)
import Control.Monad.Logger (MonadLoggerIO (..))
import UnliftIO (MonadUnliftIO (..), UnliftIO (..))
import UnliftIO (MonadUnliftIO (..))
-- Sessions
type SessionMap = Map Text ByteString
@ -437,9 +437,8 @@ instance PrimMonad (WidgetFor site) where
primitive = liftIO . primitive
-- | @since 1.4.38
instance MonadUnliftIO (WidgetFor site) where
{-# INLINE askUnliftIO #-}
askUnliftIO = WidgetFor $ \wd ->
return (UnliftIO (flip unWidgetFor wd))
{-# INLINE withRunInIO #-}
withRunInIO inner = WidgetFor $ \x -> inner $ flip unWidgetFor x
instance MonadReader (WidgetData site) (WidgetFor site) where
ask = WidgetFor return
local f (WidgetFor g) = WidgetFor $ g . f
@ -476,9 +475,8 @@ instance MonadReader (HandlerData site site) (HandlerFor site) where
-- | @since 1.4.38
instance MonadUnliftIO (HandlerFor site) where
{-# INLINE askUnliftIO #-}
askUnliftIO = HandlerFor $ \r ->
return (UnliftIO (flip unHandlerFor r))
{-# INLINE withRunInIO #-}
withRunInIO inner = HandlerFor $ \x -> inner $ flip unHandlerFor x
instance MonadThrow (HandlerFor site) where
throwM = liftIO . throwM
@ -549,9 +547,8 @@ instance MonadReader (HandlerData child master) (SubHandlerFor child master) whe
-- | @since 1.4.38
instance MonadUnliftIO (SubHandlerFor child master) where
{-# INLINE askUnliftIO #-}
askUnliftIO = SubHandlerFor $ \r ->
return (UnliftIO (flip unSubHandlerFor r))
{-# INLINE withRunInIO #-}
withRunInIO inner = SubHandlerFor $ \x -> inner $ flip unSubHandlerFor x
instance MonadThrow (SubHandlerFor child master) where
throwM = liftIO . throwM

View File

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