Exception +Control.Monad.Trans

package exception-mailer
package
This module is designed to be used in production code when no runtime exceptions are expected.  This module will catch any unexpected runtime exception and send a notification email Version 0.3
package exception-monads-fd
package
This package provides exception monad transformer instances for the classes defined by monads-fd. Version 0.2
package exception-monads-tf
package
This package provides exception monad transformer instances for the classes defined by monads-tf. Version 0.3.0.2
package exception-mtl
package
This package provides exception monad transformer instances for the classes defined by mtl2. Version 0.3.0.3
package exception-transformers
package
This package provides type classes, a monad and a monad transformer that support unchecked extensible exceptions as well as asynchronous exceptions. It is compatible with the transformers package. Version 0.3.0.3
package exceptions
package
Extensible optionally-pure exceptions Version 0.3.2
package control-monad-exception
package
This package provides explicitly typed, checked exceptions as a library. Computations throwing different types of exception can be combined seamlessly. Example > data Expr = Add Expr Expr | Div Expr Expr | Val Double > eval (Val x)     = return x > eval (Add a1 a2) = do > v1 <- eval a1 > v2 <- eval a2 > let sum = v1 + v2 > if sum < v1 || sum < v2 then throw SumOverflow else return sum > eval (Div a1 a2) = do > v1 <- eval a1 > v2 <- eval a2 > if v2 == 0 then throw DivideByZero else return (v1 / v2) > data DivideByZero = DivideByZero deriving (Show, Typeable) > data SumOverflow  = SumOverflow  deriving (Show, Typeable) > instance Exception DivideByZero > instance Exception SumOverflow GHCi infers the following types > eval :: (Throws DivideByZero l, Throws SumOverflow l) => > Expr -> EM l Double > eval `catch` \ (e::DivideByZero) -> return (-1)  :: Throws > SumOverflow l => Expr -> EM l Double > runEM(eval `catch` \ (e::SomeException) -> return (-1)) > :: Expr -> Double In addition to explicitly typed exceptions his package provides: * Support for explicitly documented, unchecked exceptions (via Control.Monad.Exception.tryEMT). * Support for selective unchecked exceptions (via Control.Monad.Exception.UncaughtException). * Support for exception call traces via Control.Monad.Loc.MonadLoc. Example: > f () = do throw MyException > g a  = do f a > main = runEMT $ do g () `catchWithSrcLoc` > \loc (e::MyException) -> lift(putStrLn$ > showExceptionWithTrace loc e) > -- Running main produces the output: > *Main> main > MyException > in f, Main(example.hs): (1,6) > g, Main(example.hs): (2,6) > main, Main(example.hs): (5,9) > main, Main(example.hs): (4,16) Changes: * 0.9.0 - Moved to transformers (finally leaving the whole mtl-transformers cisma behind) * 0.10.0 - removed the dependency on safe-failure * 0.10.1 - compatibility with failure 0.2 (thanks to Bas van Dijk) * 0.10.2 - use the identity type from mtl (thanks to Bas), require minimum cabal-install version (thanks to Bernhard Urban) * 0.10.3 - Moved the MonadIO instance to the main package * 0.10.3.1 - Compatibility with base 4.6 Version 0.10.3.1
package control-monad-exception-monadsfd
package
Monads-fd instances for the EMT exceptions monad transformer Version 0.10.3
package control-monad-exception-monadstf
package
Monads-tf instances for the EMT exceptions monad transformer Version 0.10.3
package control-monad-exception-mtl
package
MTL classes instances for the EMT exceptions monad transformer Version 0.10.3
package explicit-exception
package
Synchronous and Asynchronous exceptions which are explicit in the type signature. The first ones are very similar to Either and Control.Monad.Error.ErrorT. The second ones are used for System.IO.readFile and System.IO.hGetContents. This package is a proposal for improved exception handling in Haskell. It strictly separates between handling of exceptional situations (file not found, invalid user input, see http://www.haskell.org/haskellwiki/Exception) and (programming) errors (division by zero, index out of range, see http://www.haskell.org/haskellwiki/Error). Handling of the first one is called &quot;exception handling&quot;, whereas handling of errors is better known as &quot;debugging&quot;. For applications see the packages midi, spreadsheet, http-monad. Although I'm not happy with the identifier style of the Monad Transformer Library (partially intended for unqualified use) I have tried to adopt it for this library, in order to let Haskell programmers get accustomed easily to it. To do: Because many people requested it, we will provide a bracket function that frees a resource both when an exception and an error occurs, that is, it combines exception handling and debugging. However note that freeing resources in case of an error is dangerous and may cause further damage. Version 0.1.7.1
package extensible-exceptions
package
This package provides extensible exceptions for both new and old versions of GHC (i.e., < 6.10). Version 0.1.1.4
package iException
package
This module was generated by interleavableGen. Version 0.0.1
package monad-exception
package
Extensible exceptions are a good solution to the exception problem in Haskell. However, there is one problem: they are not extensible enough! The problem is that the functions defined in Control.Exception for dealing with exceptions can only be used with the IO monad. A lot of Haskell code uses a stack of monads, at the bottom of which is IO, but the IO monad is not used directly. There have been many attempts to solve this problem, but the stumbling block has been the presence of short-circuiting monad transformers: sometimes, these prevented the cleanup actions from being run, making it effectively impossible to catch exceptions in such monads. The monad-control package has been developed as a solution to this problem: it defines a way to turn a monad transformer stack &quot;inside-out&quot;, which ensures that cleanup actions are run even when the original action short-circuits. The lifted-base package, built on top of monad-control, exports the Control.Exception.Lifted module, which contains versions of the Control.Exception functions that work on any monad stack with IO at its base. This has pretty much solved the above problems. However, one thing that the solutions that came before monad-control did was provide a type class encapsulating exception functionality that could be implemented by pure monads, allowing you to use the same interface to throw and catch exceptions in both pure and IO-based code. This also makes it possible to express which can throw an exception, but which don't necessarily do any IO and which are polymorphic in their exception throwing (i.e., you could run the function in IO and it would use throwIO, or you could run it as an Either and it would use Left). That's what this package does. It provides a MonadException type class (in the Control.Monad.Exception.Class module), which has instances for IO and IO-like monads (for which monad-control is used to provide the correct instances as described above), as well as for some pure monads. Several overlapping instances (in the spirit of mtl-evil-instances) are provided, so it is not necessary to provide a pass-through instance for MonadException for every monad transformer you write. This package also defines an ExceptionT monad transformer (in Control.Monad.Trans.Exception) that can be used to add MonadException functionality to otherwise pure monad stacks. mtl-evil-instances is used to automatically provide pass-through instances for the mtl type classes for this transformer. Finally, this package includes the module Control.Exception.Monadic, which is a full replacement for Control.Exception, whose functions work on any instance of MonadException and not just IO. The functions for dealing with asynchronous exceptions require IO however, so these are only polymorphic for any IO-like monadic (as determined by monad-control). Version 0.1
package resumable-exceptions
package
This package defines a monad transformer for resumable exceptions; like ErrorT except the exceptions include a resumption. It interoperates with the mtl monads, but beware!, many of those instances are unvalidated. Version 0.0.0.20100920
package unexceptionalio
package
When you've caught all the exceptions that can be handled safely, this is what you're left with. Version 0.1.0