optparse-generic

Auto-generate a command-line parser for your datatype

Version on this page:1.3.1
LTS Haskell 22.43:1.5.2@rev:1
Stackage Nightly 2024-12-04:1.5.2@rev:1
Latest on Hackage:1.5.2@rev:1

See all snapshots optparse-generic appears in

BSD-3-Clause licensed by Gabriel Gonzalez
Maintained by [email protected]
This version can be pinned in stack with:optparse-generic-1.3.1@sha256:faacff0f0e11de46832f2ff975b12b9ee0f39319a0371d9364b938849ac161c2,1653

Module documentation for 1.3.1

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.1

  • Export GenericParseRecord and getRecord{,PureWith}

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