fail package:Cabal-syntax

Lazily reconstruct a value previously written to a file.
Compatibility layer for Control.Monad.Fail
When a value is bound in do-notation, the pattern on the left hand side of <- might not match. In this case, this class provides a function to recover. A Monad without a MonadFail instance may only be used in conjunction with pattern that always match, such as newtypes, tuples, data types with only a single data constructor, and irrefutable patterns (~pat). Instances of MonadFail should satisfy the following law: fail s should be a left zero for >>=,
fail s >>= f  =  fail s
If your Monad is also MonadPlus, a popular definition is
fail _ = mzero
fail s should be an action that runs in the monad itself, not an exception (except in instances of MonadIO). In particular, fail should not be implemented in terms of error.
indicates program failure with an exit code. The exact interpretation of the code is operating-system dependent. In particular, some values may be prohibited (e.g. 0 on a POSIX-compliant system).
The computation exitFailure is equivalent to exitWith (ExitFailure exitfail), where exitfail is implementation-dependent.
Add an error, but not fail the parser yet. For fatal failure use parseFatalFailure
Add an fatal error.
A mzero.
Lazily reconstruct a value previously written to a file.
A temporary extension to help library authors check if their code will compile with the new planned desugaring of fail.