annotated-exception 0.2.0.1 → 0.2.0.2
raw patch · 4 files changed
+32/−13 lines, 4 filesPVP: major bump suggested
API removals or changes: PVP suggests a major version bump
API changes (from Hackage documentation)
- Control.Exception.Annotated.UnliftIO: checkpointCallStack :: (MonadCatch m, HasCallStack) => m a -> m a
+ Control.Exception.Annotated.UnliftIO: checkpointCallStack :: forall m a. (MonadUnliftIO m, HasCallStack) => m a -> m a
Files
- ChangeLog.md +6/−2
- annotated-exception.cabal +1/−1
- src/Control/Exception/Annotated/UnliftIO.hs +23/−10
- test/Control/Exception/Annotated/UnliftIOSpec.hs +2/−0
ChangeLog.md view
@@ -1,6 +1,10 @@-# Changelog for located-exception+# Changelog for `annotated-exception` -## Unreleased changes+## 0.2.0.2++- [#14](https://github.com/parsonsmatt/annotated-exception/pull/14)+ - Define `Control.Exception.Annotated.UnliftIO.checkpointCallStack` without+ re-exporting the `MonadCatch` variant. Sigh. ## 0.2.0.1
annotated-exception.cabal view
@@ -5,7 +5,7 @@ -- see: https://github.com/sol/hpack name: annotated-exception-version: 0.2.0.1+version: 0.2.0.2 synopsis: Exceptions, with checkpoints and context. description: Please see the README on Github at <https://github.com/parsonsmatt/annotated-exception#readme> category: Control
src/Control/Exception/Annotated/UnliftIO.hs view
@@ -39,16 +39,17 @@ , MonadUnliftIO(..) ) where -import Control.Exception.Annotated hiding- ( catch- , catches- , checkpoint- , checkpointCallStackWith- , checkpointMany- , throw- , throwWithCallStack- , try- , tryAnnotated+import Control.Exception.Annotated+ ( AnnotatedException(..)+ , Annotation(..)+ , CallStackAnnotation(..)+ , Exception(..)+ , Handler(..)+ , addCallStackToException+ , annotatedExceptionCallStack+ , check+ , exceptionWithCallStack+ , hide ) import qualified Control.Exception.Annotated as Catch import qualified Control.Exception.Safe as Safe@@ -76,6 +77,18 @@ checkpoint :: forall m a. (MonadUnliftIO m, HasCallStack) => Annotation -> m a -> m a checkpoint ann action = withRunInIO $ \runInIO -> liftIO $ withFrozenCallStack (Catch.checkpoint ann) (runInIO action)++-- | Like 'Catch.checkpointCallStack', but uses 'MonadUnliftIO' instead of+-- 'Control.Monad.Catch.MonadCatch'.+--+-- @since 0.2.0.2+checkpointCallStack+ :: forall m a. (MonadUnliftIO m, HasCallStack)+ => m a+ -> m a+checkpointCallStack action =+ withRunInIO $ \runInIO ->+ withFrozenCallStack Catch.checkpointCallStack (runInIO action) -- | Like 'Catch.checkpointMany', but uses 'MonadUnliftIO' instead of -- 'Control.Monad.Catch.MonadCatch'.
test/Control/Exception/Annotated/UnliftIOSpec.hs view
@@ -1,3 +1,5 @@+{-# language RecordWildCards, StrictData, RankNTypes #-}+ module Control.Exception.Annotated.UnliftIOSpec where import Test.Hspec