LIB: more general type for rethrowErrnoAs

This commit is contained in:
Julian Ospald 2016-04-08 02:09:59 +02:00
parent 17407860f4
commit 844abcdc86
No known key found for this signature in database
GPG Key ID: 511B62C09D50CD28

View File

@ -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)