packages feed

refresht 0.1.0.1 → 0.1.1.0

raw patch · 2 files changed

+14/−3 lines, 2 filesdep ~lensdep ~refreshtPVP: major bump suggested

API removals or changes: PVP suggests a major version bump

Dependency ranges changed: lens, refresht

API changes (from Hackage documentation)

+ Control.Monad.Refresh: instance Control.Monad.Catch.MonadCatch m => Control.Monad.Catch.MonadCatch (Control.Monad.Refresh.RefreshT s m)
+ Control.Monad.Refresh: instance Control.Monad.Catch.MonadThrow m => Control.Monad.Catch.MonadThrow (Control.Monad.Refresh.RefreshT s m)
- Control.Monad.Refresh: isRefreshingError :: forall s_acO2 m_acO3. Lens' (RefreshSetting s_acO2 m_acO3) (SomeException -> Bool)
+ Control.Monad.Refresh: isRefreshingError :: forall s_acPm m_acPn. Lens' (RefreshSetting s_acPm m_acPn) (SomeException -> Bool)
- Control.Monad.Refresh: refreshDelay :: forall s_acO2 m_acO3. Lens' (RefreshSetting s_acO2 m_acO3) Int
+ Control.Monad.Refresh: refreshDelay :: forall s_acPm m_acPn. Lens' (RefreshSetting s_acPm m_acPn) Int
- Control.Monad.Refresh: refresher :: forall s_acO2 m_acO3. Lens' (RefreshSetting s_acO2 m_acO3) (s_acO2 -> m_acO3 s_acO2)
+ Control.Monad.Refresh: refresher :: forall s_acPm m_acPn. Lens' (RefreshSetting s_acPm m_acPn) (s_acPm -> m_acPn s_acPm)
- Control.Monad.Refresh: shouldRefresh :: forall s_acO2 m_acO3. Lens' (RefreshSetting s_acO2 m_acO3) (s_acO2 -> m_acO3 Bool)
+ Control.Monad.Refresh: shouldRefresh :: forall s_acPm m_acPn. Lens' (RefreshSetting s_acPm m_acPn) (s_acPm -> m_acPn Bool)

Files

refresht.cabal view
@@ -1,5 +1,5 @@ name: refresht-version: 0.1.0.1+version: 0.1.1.0 cabal-version: >=1.10 build-type: Simple license: BSD3@@ -36,7 +36,7 @@     buildable: False     build-depends:         base >=4.9.0.0 && <4.10,-        refresht >=0.1.0.1 && <0.2,+        refresht >=0.1.1.0 && <0.2,         mtl >=2.2.1 && <2.3,         data-default >=0.7.1.1 && <0.8,         lens ==4.14.*,
src/Control/Monad/Refresh.hs view
@@ -34,7 +34,7 @@ import Control.Concurrent  (threadDelay) import Control.Exception   (SomeException (..)) import Control.Lens        (makeLenses, view, (^.))-import Control.Monad.Catch (MonadCatch (..), catchIf)+import Control.Monad.Catch (MonadCatch (..), MonadThrow (..), catchIf) import Control.Monad.RWS   (MonadTrans (..), RWST (..), ask, evalRWST, get,                             gets) import Control.Monad.RWS   (MonadIO (liftIO), MonadReader (..), modify, runRWST)@@ -160,6 +160,17 @@       f <- gets modifier       return $! f s'       else gets runLocaled++-- | Since 0.1.1.0+instance MonadThrow m => MonadThrow (RefreshT s m) where+  throwM = RefreshT . throwM+  {-# INLINE throwM #-}++-- | N.B. When exception is @'catch'@ed, no resource refreshment will be occured.+--        This allows users a flexible control on refreshment timing.+instance MonadCatch m => MonadCatch (RefreshT s m) where+  catch (RefreshT a) h = RefreshT $ catch a (runRefreshT_ . h)+  {-# INLINE catch #-}  -- | Forces environmental refreshment, regardless of @'shouldRefresh'@ condition. --