From 844abcdc8636ea8b7498137ecbc657599e870013 Mon Sep 17 00:00:00 2001 From: Julian Ospald Date: Fri, 8 Apr 2016 02:09:59 +0200 Subject: [PATCH] LIB: more general type for rethrowErrnoAs --- src/HSFM/FileSystem/Errors.hs | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/HSFM/FileSystem/Errors.hs b/src/HSFM/FileSystem/Errors.hs index 591b176..9f48a6d 100644 --- a/src/HSFM/FileSystem/Errors.hs +++ b/src/HSFM/FileSystem/Errors.hs @@ -200,8 +200,9 @@ catchErrno en a1 a2 = -- |Execute the given action and retrow IO exceptions that have the given errno. -rethrowErrnoAs :: Errno -- ^ errno to catch - -> FmIOException -- ^ rethrow as +rethrowErrnoAs :: Exception e + => Errno -- ^ errno to catch + -> e -- ^ rethrow as -> IO a -- ^ action to try -> IO a rethrowErrnoAs en fmex action = catchErrno en action (throw fmex)