optparse-simple: Simple interface to optparse-applicative

[ bsd3, library, options ] [ Propose Tags ] [ Report a vulnerability ]

Modules

[Index] [Quick Jump]

Flags

Manual Flags

NameDescriptionDefault
build-example

Build the example executable

Disabled

Use -f <flag> to enable a flag, or -f -<flag> to disable that flag. More info

Downloads

Maintainer's Corner

Package maintainers

For package maintainers and hackage trustees

Candidates

  • No Candidates
Versions [RSS] 0.0.0, 0.0.1, 0.0.2, 0.0.3, 0.0.4, 0.1.0, 0.1.1, 0.1.1.1, 0.1.1.2, 0.1.1.3, 0.1.1.4
Change log ChangeLog.md
Dependencies base (>=4.9.1 && <5), githash (>=0.1.3.0), optparse-applicative, optparse-simple, semigroups (>=0.18 && <0.19), template-haskell, transformers (>=0.4) [details]
License BSD-3-Clause
Copyright 2015-2017 FP Complete
Author FP Complete
Maintainer chrisdone@fpcomplete.com
Category Options
Home page https://github.com/fpco/optparse-simple#readme
Bug tracker https://github.com/fpco/optparse-simple/issues
Source repo head: git clone https://github.com/fpco/optparse-simple
Uploaded by MichaelSnoyman at 2018-12-25T05:40:00Z
Distributions Arch:0.1.1.4, Debian:0.1.1.2, Fedora:0.1.1.4, LTSHaskell:0.1.1.4, NixOS:0.1.1.4, Stackage:0.1.1.4
Reverse Dependencies 10 direct, 31 indirect [details]
Executables simple
Downloads 29646 total (32 in the last 30 days)
Rating (no votes yet) [estimated by Bayesian average]
Your Rating
  • λ
  • λ
  • λ
Status Docs available [build log]
Last success reported on 2018-12-25 [all 1 reports]

Readme for optparse-simple-0.1.1

[back to package description]

optparse-simple

Simple interface to optparse-applicative

Usage

Typical usage with no commands:

do (opts,()) <- simpleOptions "ver" "header" "desc" (flag () () (long "some-flag")) empty doThings opts 

Typical usage with commands:

do (opts,runCmd) <- simpleOptions "ver" "header" "desc" (pure ()) $ do addCommand "delete" "Delete the thing" (const deleteTheThing) (pure ()) addCommand "create" "Create a thing" createAThing (strOption (long "hello")) runCmd