try package:unliftio
Run the given action and catch any synchronous exceptions as a
Left value.
This is parameterized on the exception type. To catch all synchronous
exceptions, use
tryAny.
try specialized to catch all synchronous exceptions.
tryDeep specialized to catch all synchronous exceptions.
Same as
try, but fully force evaluation of the result value to
find all impure exceptions.
A variant of
try that takes an exception predicate to select
which exceptions are caught.
A variant of
try that catches both synchronous and asynchronous
exceptions.
See
catchSyncOrAsync.
A version of
peekTBQueue which does not retry. Instead it
returns
Nothing if no value is available.
A version of
peekTChan which does not retry. Instead it returns
Nothing if no value is available.
A version of
peekTQueue which does not retry. Instead it
returns
Nothing if no value is available.
A version of
readTBQueue which does not retry. Instead it
returns
Nothing if no value is available.
A version of
readTChan which does not retry. Instead it returns
Nothing if no value is available.
A version of
readTMVar which does not retry. Instead it returns
Nothing if no value is available.
A version of
readTQueue which does not retry. Instead it
returns
Nothing if no value is available.
Evaluate the value to WHNF and catch any synchronous exceptions.
The expression may still have bottom values within it; you may instead
want to use
pureTryDeep.
Evaluate the value to NF and catch any synchronous exceptions.