primal-0.1.0.0: Primeval world of Haskell.

Copyright(c) Alexey Kuleshevich 2020
LicenseBSD3
MaintainerAlexey Kuleshevich <alexey@kuleshevi.ch>
Stabilityexperimental
Portabilitynon-portable
Safe HaskellNone
LanguageHaskell2010

Control.Prim.Exception

Description

 
Synopsis

Documentation

throwPrim :: (Exception e, MonadPrim s m) => e -> m a Source #

This is the same as throwM, but restricted to MonadPrim

catch :: forall e a m. (Exception e, MonadUnliftPrim RW m) => m a -> (e -> m a) -> m a Source #

catchAny :: forall a m. MonadUnliftPrim RW m => m a -> (SomeException -> m a) -> m a Source #

catchAnySync :: forall a m. MonadUnliftPrim RW m => m a -> (SomeException -> m a) -> m a Source #

catchAll :: forall a m. MonadUnliftPrim RW m => m a -> (forall e. Exception e => e -> m a) -> m a Source #

catchAllSync :: forall a m. MonadUnliftPrim RW m => m a -> (forall e. Exception e => e -> m a) -> m a Source #

maskAsyncExceptions :: forall a m. MonadUnliftPrim RW m => m a -> m a Source #

unmaskAsyncExceptions :: forall a m. MonadUnliftPrim RW m => m a -> m a Source #

maskUninterruptible :: forall a m. MonadUnliftPrim RW m => m a -> m a Source #

throwTo :: (MonadPrim RW m, Exception e) => ThreadId -> e -> m () Source #

Similar to throwTo from unliftio this will wrap any known non-async exception with SomeAsyncException, because otherwise semantics of throwTo with respect to asynchronous exceptions are violated.