packages feed

error 0.2.1.1 → 0.2.1.2

raw patch · 3 files changed

+9/−4 lines, 3 filesPVP ok

version bump matches the API change (PVP)

API changes (from Hackage documentation)

Files

CHANGELOG.md view
@@ -1,5 +1,9 @@ # Revision history for error +## 0.2.1.2 -- 2021-11-15++* Fix doctests.+ ## 0.2.1.1 -- 2021-11-14  * Make compatible with GHC 8.0.2 again by not using `<&>`.
error.cabal view
@@ -1,6 +1,6 @@ cabal-version:      2.4 name:               error-version:            0.2.1.1+version:            0.2.1.2  synopsis: The canonical error type 
src/Data/Error.hs view
@@ -192,7 +192,7 @@ -- Example: -- -- >>> unwrapIOError $ Left (newError "oh no!")--- oh no!+-- *** Exception: oh no! -- -- Important: 'Error' itself does /not/ implement 'Exception' to discourage the exception workflow. -- The 'Exception' thrown is private to this module and thus can’t be “caught” in a typed manner.@@ -215,7 +215,7 @@ -- Example: -- -- >>> expectIOError "something bad happened" $ Left (newError "oh no!")--- something bad happened: oh no!+-- *** Exception: something bad happened: oh no! -- -- Important: 'Error' itself does /not/ implement 'Exception' to discourage the exception workflow. -- The 'Exception' thrown is private to this module and thus can’t be “caught” in a typed manner.@@ -245,7 +245,7 @@ -- and if you just want to annotate the error and directly throw it again: -- -- >>> Control.Exception.throwIO (userError "oh noes!") & ifIOError "could not open file" >>= unwrapIOError--- could not open file: user error (oh noes!)+-- *** Exception: could not open file: user error (oh noes!) ifIOError :: Text -> IO a -> IO (Either Error a) ifIOError = ifError @Exc.IOException @@ -257,6 +257,7 @@ -- -- Use @TypeApplications@ to specify the 'Exception' you want to catch. --+-- >>> :set -XTypeApplications -- >>> ifError @Exc.ArithException "arithmetic exception" (putStr $ show $ 1 Data.Ratio.% 0) -- Left (Error ["arithmetic exception","Ratio has zero denominator"]) --