lens-3.10: Lenses, Folds and Traversals

Portability | Control.Exception
Stability | provisional
Maintainer | Edward Kmett <ekmett@gmail.com>
Safe Haskell | None

System.Exit.Lens

Description

These prisms can be used with the combinators in Control.Exception.Lens.

Synopsis

- class AsExitCode p f t where
  - _ExitCode :: Overloaded' p f t ExitCode
- _ExitFailure :: (AsExitCode p f t, Choice p, Applicative f) => Overloaded' p f t Int
- _ExitSuccess :: (AsExitCode p f t, Choice p, Applicative f) => Overloaded' p f t ()

# Documentation

class AsExitCode p f t where Source

Exit codes that a program can return with:

Methods

_ExitCode :: Overloaded' p f t ExitCode Source

     _ExitCode :: Equality' ExitCode      ExitCode
     _ExitCode :: Prism'    SomeException ExitCode

Instances

(Choice p, Applicative f) => AsExitCode p f SomeException |
AsExitCode p f ExitCode |

_ExitFailure :: (AsExitCode p f t, Choice p, Applicative f) => Overloaded' p f 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' ExitCode      Int
     _ExitFailure :: Prism' SomeException Int

_ExitSuccess :: (AsExitCode p f t, Choice p, Applicative f) => Overloaded' p f t ()Source

indicates successful termination;

     _ExitSuccess :: Prism' ExitCode      ()
     _ExitSuccess :: Prism' SomeException ()