BSD-3-Clause licensed by FP Complete
Maintained by [email protected]
This version can be pinned in stack with:optparse-simple-0.1.1.4@sha256:833326c18a91f7d09e94167b39936835c772b40edf31ee6368da1ced7e1a2e8d,1851

Module documentation for 0.1.1.4

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

Changes

ChangeLog for optparse-simple

0.1.1.4

  • template-haskell 2.17 support #15

0.1.1.3

  • optparse-applicative 0.16.0.0 support #14

0.1.1.2

  • Run TH slice at the right time to get proper Git info #13

0.1.1.1

  • Add explicit signature to work around #12

0.1.1

  • Switch dependency gitrev to githash

0.1.0

  • Migrate from EitherT to ExceptT #8

0.0.4

  • Support --help on subcommands