optparse-simple: Simple interface to optparse-applicative

[ bsd3, library, options ] [ Propose Tags ]

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


[Skip to Readme]
Versions [faq] 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
Change log ChangeLog.md
Dependencies base (>=4.9.1 && <5), githash (>=0.1.3.0), optparse-applicative, optparse-simple, semigroups (==0.18.*), 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 Thu Jan 31 18:43:17 UTC 2019
Distributions Arch:0.1.1.1, Debian:0.1.0, Fedora:0.1.0, LTSHaskell:0.1.1.1, NixOS:0.1.1.1, Stackage:0.1.1.1
Executables simple
Downloads 11358 total (323 in the last 30 days)
Rating (no votes yet) [estimated by rule of succession]
Your Rating
  • λ
  • λ
  • λ
Status Hackage Matrix CI
Docs available [build log]
Last success reported on 2019-01-31 [all 1 reports]

Modules

[Index] [Quick Jump]

Flags

NameDescriptionDefaultType
build-example

Build the example executable

DisabledManual

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

Downloads

Maintainer's Corner

For package maintainers and hackage trustees


Readme for optparse-simple-0.1.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