| Copyright | (C) 2013-15 Edward Kmett |
|---|---|
| License | BSD-style (see the file LICENSE) |
| Maintainer | Edward Kmett <ekmett@gmail.com> |
| Stability | provisional |
| Portability | Control.Exception |
| Safe Haskell | None |
| Language | Haskell98 |
System.Exit.Lens
Description
These prisms can be used with the combinators in Control.Exception.Lens.
- class AsExitCode t where
- _ExitFailure :: AsExitCode t => Prism' t Int
- _ExitSuccess :: AsExitCode t => Prism' t ()
Documentation
class AsExitCode t where Source
Exit codes that a program can return with:
Minimal complete definition
Nothing
Instances
_ExitFailure :: AsExitCode t => Prism' t Int Source
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).
_ExitFailure::Prism'ExitCodeInt_ExitFailure::Prism'SomeExceptionInt
_ExitSuccess :: AsExitCode t => Prism' t () Source
indicates successful termination;
_ExitSuccess::Prism'ExitCode()_ExitSuccess::Prism'SomeException()