The optparse-simple package

[ Tags: bsd3, library, options ] [ Propose Tags ]

Please see the README at https://www.stackage.org/package/optparse-simple


[Skip to Readme]

Properties

Versions 0.0.0, 0.0.1, 0.0.2, 0.0.3, 0.0.4, 0.1.0
Change log ChangeLog.md
Dependencies base (==4.*), gitrev, optparse-applicative, template-haskell, transformers (>=0.4) [details]
License BSD3
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 repository head: git clone https://github.com/fpco/optparse-simple
Uploaded Tue Nov 28 09:35:14 UTC 2017 by MichaelSnoyman
Distributions Arch:0.1.0, Debian:0.0.3, LTSHaskell:0.0.4, NixOS:0.1.0, Stackage:0.1.0, Tumbleweed:0.0.3
Downloads 7616 total (325 in the last 30 days)
Rating (no votes yet) [estimated by rule of succession]
Your Rating
  • λ
  • λ
  • λ
Status Docs available [build log]
Last success reported on 2017-11-28 [all 1 reports]
Hackage Matrix CI

Modules

[Index]

Downloads

Maintainer's Corner

For package maintainers and hackage trustees


Readme for optparse-simple-0.1.0

[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