base-compat-0.12.3: A compatibility layer for base

Safe Haskell | Trustworthy
Language | Haskell2010

Control.Exception.Compat

Synopsis

- module Control.Exception
- throw :: forall (r :: RuntimeRep) (a :: TYPE r) e. Exception e => e -> a

# Documentation

module Control.Exception

throw :: forall (r :: RuntimeRep) (a :: TYPE r) e. Exception e => e -> a Source #

Throw an exception. Exceptions may be thrown from purely functional code, but may only be caught within the `IO` monad.

WARNING: You may want to use `throwIO` instead so that your pure code stays exception-free.