BSD-3-Clause licensed by FP Complete

Module documentation for 0.1.1.2

This version can be pinned in stack with:optparse-simple-0.1.1.2@sha256:67c2cb36dde861e5276925dec89e62981c7376039726f7407fdf0b321a953cdb,1912

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.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
comments powered byDisqus