module Network.Wai.Handler.Warp.Imports ( ByteString (..), NonEmpty (..), module Control.Applicative, module Control.Monad, module Data.Bits, module Data.Int, module Data.Monoid, module Data.Ord, module Data.Word, module Data.Maybe, module Numeric, throughAsync, isAsyncException, ) where import Control.Applicative import Control.Exception import Control.Monad import Data.Bits import Data.ByteString.Internal (ByteString (..)) import Data.Int import Data.List.NonEmpty (NonEmpty (..)) import Data.Maybe import Data.Monoid import Data.Ord import Data.Word import Numeric isAsyncException :: Exception e => e -> Bool isAsyncException :: forall e. Exception e => e -> Bool isAsyncException e e = case SomeException -> Maybe SomeAsyncException forall e. Exception e => SomeException -> Maybe e fromException (e -> SomeException forall e. Exception e => e -> SomeException toException e e) of Just (SomeAsyncException e _) -> Bool True Maybe SomeAsyncException Nothing -> Bool False throughAsync :: IO a -> SomeException -> IO a throughAsync :: forall a. IO a -> SomeException -> IO a throughAsync IO a action (SomeException e e) | e -> Bool forall e. Exception e => e -> Bool isAsyncException e e = e -> IO a forall e a. Exception e => e -> IO a throwIO e e | Bool otherwise = IO a action