Dangerous 0.2.2 → 0.2.3
raw patch · 2 files changed
+6/−1 lines, 2 filesPVP ok
version bump matches the API change (PVP)
API changes (from Hackage documentation)
+ Control.Dangerous: dangerize :: (Errorable m, Show s) => Either s a -> m a
Files
- Dangerous.cabal +1/−1
- src/Control/Dangerous.hs +5/−0
Dangerous.cabal view
@@ -1,5 +1,5 @@ Name: Dangerous-Version: 0.2.2+Version: 0.2.3 License: MIT License-file: LICENSE Category: Error Handling
src/Control/Dangerous.hs view
@@ -12,6 +12,7 @@ , result , execute , extract+ , dangerize ) where @@ -149,3 +150,7 @@ extract (Left (Failure s)) = hPutStrLn stderr s >> exitFailure extract (Left (Exit n s)) = hPutStrLn stderr s >> exitWith (ExitFailure n) extract (Right a) = return a++dangerize :: (Errorable m, Show s) => Either s a -> m a+dangerize (Left e) = throw e+dangerize (Right v) = return v