lens-4.17.1: Lenses, Folds and Traversals

Copyright | (C) 2013-16 Edward Kmett
License | BSD-style (see the file LICENSE)
Maintainer | Edward Kmett <ekmett@gmail.com>
Stability | provisional
Portability | Control.Exception
Safe Haskell | Safe
Language | Haskell2010

System.Exit.Lens

Description

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

Synopsis

- class AsExitCode t where
  - _ExitCode :: Prism' t ExitCode
- _ExitFailure :: AsExitCode t => Prism' t Int
- _ExitSuccess :: AsExitCode t => Prism' t ()
- pattern ExitFailure_ :: forall s. AsExitCode s => Int -> s
- pattern ExitSuccess_ :: forall s. AsExitCode s => s

# Documentation

class AsExitCode t where Source #

Exit codes that a program can return with:

Methods

_ExitCode :: Prism' t ExitCode Source #

Instances

AsExitCode ExitCode Source # |
Instance details Defined in System.Exit.Lens Methods _ExitCode :: Prism' ExitCode ExitCode Source #
AsExitCode SomeException Source # |
Instance details Defined in System.Exit.Lens Methods _ExitCode :: Prism' SomeException ExitCode Source #

_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' ExitCode      Int
    _ExitFailure :: Prism' SomeException Int

_ExitSuccess :: AsExitCode t => Prism' t () Source #

indicates successful termination;

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

pattern ExitFailure_ :: forall s. AsExitCode s => Int -> s Source #

pattern ExitSuccess_ :: forall s. AsExitCode s => s Source #