@@ -161,15 +161,15 @@ withTransactionModeRetry mode shouldRetry conn act =
161 commit conn
161 commit conn
164− retryLoop :: IO (Either E.SomeException a) -> IO a
164+ retryLoop :: IO (Either SqlError a) -> IO a
165 retryLoop act' = do
165 retryLoop act' = do
166 beginMode mode conn
166 beginMode mode conn
167 r <- act'
167 r <- act'
168 case r of
168 case r of
169 Left e ->
169 Left e ->
170− case fmap shouldRetry (E.fromException e) of
170+ case shouldRetry e of
171− Just True -> retryLoop act'
171+ True -> retryLoop act'
172− _ -> E.throwIO e
172+ False -> E.throwIO e
173 Right a ->
173 Right a ->