optparse-generic

Auto-generate a command-line parser for your datatype

LTS Haskell 13.28:1.3.0@rev:1
Stackage Nightly 2019-07-16:1.3.0@rev:2
Latest on Hackage:1.3.0@rev:2

See all snapshots optparse-generic appears in

BSD-3-Clause licensed by Gabriel Gonzalez
Maintained by Gabriel439@gmail.com

Module documentation for 1.3.0

This version can be pinned in stack with:optparse-generic-1.3.0@sha256:9a86164276f1d7eda9f3e3d115093b9e9c969f2a4d3cee93e1c283f300feb3d1,1726

This library auto-generates an optparse-applicative-compatible Parser from any data type that derives the Generic interface.

See the documentation in Options.Generic for an example of how to use this library

Changes

1.3.0

  • BREAKING CHANGE: New metavar method for ParseField class
    • This field simplifies customizing ParseField instances
      • Now you usually only need to override metavar now or possibly also readField, whereas the default behavior for parseField should work more often
    • This is only a breaking change for data types that use the default implementation of ParseField but do not derive Typeable
    • You can migrate existing code that doesn’t compile by just explicitly specifying what the metavar field should be
comments powered byDisqus