Trial.OptparseApplicative

trial-optparse-applicative-0.0.0.0: Trial helper functions for optparse-applicative

Copyright | (c) 2020 Kowainik
License | MPL-2.0
Maintainer | Kowainik <xrom.xkov@gmail.com>
Safe Haskell | None
Language | Haskell2010

Trial.OptparseApplicative

Description

Trial helper functions for `optparse-applicative`.

Synopsis

- trialParser :: (Semigroup e, IsString e) => String -> Parser a -> Parser (Trial e a)
- taggedTrialParser :: (Semigroup e, IsString e) => String -> Parser a -> Parser (TaggedTrial e a)
- trialOption :: (Semigroup e, IsString e) => String -> ReadM a -> Parser (Trial e a)
- taggedTrialOption :: (Semigroup e, IsString e) => String -> ReadM a -> Parser (TaggedTrial e a)

# Documentation

trialParser #

Arguments

:: (Semigroup e, IsString e) |
=> String | Name
-> Parser a |
-> Parser (Trial e a) |

`Parser` for `Trial` data structure. It uses the provided name for better `Warning`s and `Error`s.

Since: 0.0.0.0

taggedTrialParser #

Arguments

:: (Semigroup e, IsString e) |
=> String | Option name
-> Parser a |
-> Parser (TaggedTrial e a) |

Similar to `trialParser` but returns `TaggedTrial` with the tag `CLI`.

`Parser` for `TaggedTrial` data structure. It uses the providedname for better `Warning`s and `Error`s.

Since: 0.0.0.0

trialOption #

Arguments

:: (Semigroup e, IsString e) |
=> String | Option `long` name
-> ReadM a |
-> Parser (Trial e a) |

`Parser` for `Trial` data structure. It uses the provided option `long` name for better `Warning`s and `Error`s.

Since: 0.0.0.0

taggedTrialOption #

Arguments

:: (Semigroup e, IsString e) |
=> String | Option `long` name
-> ReadM a |
-> Parser (TaggedTrial e a) |

Similar to `trialOption` but returns `TaggedTrial` with the tag `CLI`.

`Parser` for `TaggedTrial` data structure. It uses the provided option `long` name for better `Warning`s and `Error`s.

Since: 0.0.0.0