Whoops, accidentally tested the old code

This commit is contained in:
Nick Smallbone 2023-12-14 10:48:07 +01:00
parent 099762c4db
commit bf24d7374d

View File

@ -20,7 +20,7 @@ import Data.Lens.Light
import Twee.Base hiding (lookup)
import Control.Monad.Trans.State.Strict
import Control.Monad
import Data.Maybe
import Data.Typeable
(#) :: Category.Category cat => cat b c -> cat a b -> cat a c
(#) = (Category..)
@ -142,7 +142,10 @@ isResourceLimitException :: SomeException -> Bool
isResourceLimitException ex =
fromException ex == Just StackOverflow ||
fromException ex == Just HeapOverflow ||
isTimeout ex
isTimeout ex ||
case fromException ex of
Just (SomeAsyncException ex) -> isResourceLimitException (SomeException ex)
Nothing -> False
where
-- The Timeout type wasn't exported until GHC 8.10,
-- otherwise we could just do: