ghc-lib-parser
Safe HaskellNone
LanguageGHC2021

GHC.Utils.Exception

Documentation

throwTo :: Exception e => ThreadId -> e -> IO () #

catches :: IO a -> [Handler a] -> IO a #

bracket :: IO a -> (a -> IO b) -> (a -> IO c) -> IO c #

bracketOnError :: IO a -> (a -> IO b) -> (a -> IO c) -> IO c #

bracket_ :: IO a -> IO b -> IO c -> IO c #

catchJust :: Exception e => (e -> Maybe b) -> IO a -> (b -> IO a) -> IO a #

finally :: IO a -> IO b -> IO a #

handle :: Exception e => (e -> IO a) -> IO a -> IO a #

handleJust :: Exception e => (e -> Maybe b) -> (b -> IO a) -> IO a -> IO a #

mapException :: (Exception e1, Exception e2) => (e1 -> e2) -> a -> a #

onException :: IO a -> IO b -> IO a #

try :: Exception e => IO a -> IO (Either e a) #

tryJust :: Exception e => (e -> Maybe b) -> IO a -> IO (Either b a) #

throw :: forall a e. (HasCallStack, Exception e) => e -> a #

addExceptionContext :: ExceptionAnnotation a => a -> SomeException -> SomeException #

someExceptionContext :: SomeException -> ExceptionContext #

annotateIO :: ExceptionAnnotation e => e -> IO a -> IO a #

catch :: Exception e => IO a -> (e -> IO a) -> IO a #

evaluate :: a -> IO a #

interruptible :: IO a -> IO a #

mask :: ((forall a. IO a -> IO a) -> IO b) -> IO b #

mask_ :: IO a -> IO a #

throwIO :: (HasCallStack, Exception e) => e -> IO a #

uninterruptibleMask :: ((forall a. IO a -> IO a) -> IO b) -> IO b #

data Handler a #

Constructors

Exception e => Handler (e -> IO a) 

Instances

Instances details
Functor Handler # 
Instance details

Defined in GHC.Internal.Control.Exception

Methods

fmap :: (a -> b) -> Handler a -> Handler b #

(<$) :: a -> Handler b -> Handler a #

class (Typeable e, Show e) => Exception e where #

Minimal complete definition

Nothing

Instances

Instances details
Exception Timeout # 
Instance details

Defined in System.Timeout

Methods

toException :: Timeout -> SomeException #

fromException :: SomeException -> Maybe Timeout #

displayException :: Timeout -> String #

backtraceDesired :: Timeout -> Bool #

Exception SizeOverflowException # 
Instance details

Defined in Data.ByteString.Internal.Type

Methods

toException :: SizeOverflowException -> SomeException #

fromException :: SomeException -> Maybe SizeOverflowException #

displayException :: SizeOverflowException -> String #

backtraceDesired :: SizeOverflowException -> Bool #

Exception Void # 
Instance details

Defined in GHC.Internal.Exception.Type

Exception NestedAtomically # 
Instance details

Defined in GHC.Internal.Control.Exception.Base

Exception NoMatchingContinuationPrompt # 
Instance details

Defined in GHC.Internal.Control.Exception.Base

Methods

toException :: NoMatchingContinuationPrompt -> SomeException #

fromException :: SomeException -> Maybe NoMatchingContinuationPrompt #

displayException :: NoMatchingContinuationPrompt -> String #

backtraceDesired :: NoMatchingContinuationPrompt -> Bool #

Exception NoMethodError # 
Instance details

Defined in GHC.Internal.Control.Exception.Base

Exception NonTermination # 
Instance details

Defined in GHC.Internal.Control.Exception.Base

Exception PatternMatchFail # 
Instance details

Defined in GHC.Internal.Control.Exception.Base

Exception RecConError # 
Instance details

Defined in GHC.Internal.Control.Exception.Base

Exception RecSelError # 
Instance details

Defined in GHC.Internal.Control.Exception.Base

Exception RecUpdError # 
Instance details

Defined in GHC.Internal.Control.Exception.Base

Exception TypeError # 
Instance details

Defined in GHC.Internal.Control.Exception.Base

Exception Dynamic # 
Instance details

Defined in GHC.Internal.Data.Dynamic

Methods

toException :: Dynamic -> SomeException #

fromException :: SomeException -> Maybe Dynamic #

displayException :: Dynamic -> String #

backtraceDesired :: Dynamic -> Bool #

Exception ErrorCall # 
Instance details

Defined in GHC.Internal.Exception

Exception ArithException # 
Instance details

Defined in GHC.Internal.Exception.Type

Exception SomeException # 
Instance details

Defined in GHC.Internal.Exception.Type

Exception AllocationLimitExceeded # 
Instance details

Defined in GHC.Internal.IO.Exception

Exception ArrayException # 
Instance details

Defined in GHC.Internal.IO.Exception

Exception AssertionFailed # 
Instance details

Defined in GHC.Internal.IO.Exception

Exception AsyncException # 
Instance details

Defined in GHC.Internal.IO.Exception

Exception BlockedIndefinitelyOnMVar # 
Instance details

Defined in GHC.Internal.IO.Exception

Exception BlockedIndefinitelyOnSTM # 
Instance details

Defined in GHC.Internal.IO.Exception

Exception CompactionFailed # 
Instance details

Defined in GHC.Internal.IO.Exception

Exception Deadlock # 
Instance details

Defined in GHC.Internal.IO.Exception

Exception ExitCode # 
Instance details

Defined in GHC.Internal.IO.Exception

Methods

toException :: ExitCode -> SomeException #

fromException :: SomeException -> Maybe ExitCode #

displayException :: ExitCode -> String #

backtraceDesired :: ExitCode -> Bool #

Exception FixIOException # 
Instance details

Defined in GHC.Internal.IO.Exception

Methods

toException :: FixIOException -> SomeException #

fromException :: SomeException -> Maybe FixIOException #

displayException :: FixIOException -> String #

backtraceDesired :: FixIOException -> Bool #

Exception IOException # 
Instance details

Defined in GHC.Internal.IO.Exception

Exception SomeAsyncException # 
Instance details

Defined in GHC.Internal.IO.Exception

Exception FileLockingNotSupported # 
Instance details

Defined in GHC.Internal.IO.Handle.Lock.Common

Methods

toException :: FileLockingNotSupported -> SomeException #

fromException :: SomeException -> Maybe FileLockingNotSupported #

displayException :: FileLockingNotSupported -> String #

backtraceDesired :: FileLockingNotSupported -> Bool #

Exception IOPortException # 
Instance details

Defined in GHC.Internal.IOPort

Methods

toException :: IOPortException -> SomeException #

fromException :: SomeException -> Maybe IOPortException #

displayException :: IOPortException -> String #

backtraceDesired :: IOPortException -> Bool #

Exception IOEnvFailure Source # 
Instance details

Defined in GHC.Data.IOEnv

Exception SourceError Source # 
Instance details

Defined in GHC.Types.SourceError

Exception GhcException Source # 
Instance details

Defined in GHC.Utils.Panic

Exception PlainGhcException Source # 
Instance details

Defined in GHC.Utils.Panic.Plain

Exception EncodingException # 
Instance details

Defined in System.OsString.Encoding.Internal

Methods

toException :: EncodingException -> SomeException #

fromException :: SomeException -> Maybe EncodingException #

displayException :: EncodingException -> String #

backtraceDesired :: EncodingException -> Bool #

Exception ParseError # 
Instance details

Defined in Text.Parsec.Error

Methods

toException :: ParseError -> SomeException #

fromException :: SomeException -> Maybe ParseError #

displayException :: ParseError -> String #

backtraceDesired :: ParseError -> Bool #

Exception a => Exception (ExceptionWithContext a) # 
Instance details

Defined in GHC.Internal.Exception.Type

Exception e => Exception (NoBacktrace e) # 
Instance details

Defined in GHC.Internal.Exception.Type

newtype NoBacktrace e #

Constructors

NoBacktrace e 

data WhileHandling #

Instances

Instances details
ExceptionAnnotation WhileHandling # 
Instance details

Defined in GHC.Internal.Exception.Type

Show WhileHandling # 
Instance details

Defined in GHC.Internal.Exception.Type

data MaskingState #

Instances

Instances details
NFData MaskingState # 
Instance details

Defined in Control.DeepSeq

Methods

rnf :: MaskingState -> ()

Show MaskingState # 
Instance details

Defined in GHC.Internal.IO

Eq MaskingState # 
Instance details

Defined in GHC.Internal.IO

catchIO :: IO a -> (IOException -> IO a) -> IO a Source #

handleIO :: (IOException -> IO a) -> IO a -> IO a Source #

type ExceptionMonad (m :: Type -> Type) = (MonadCatch m, MonadThrow m, MonadMask m, MonadIO m) Source #