optparse-applicative is a haskell library for parsing options on the command line, and providing a powerful applicative interface for composing them. optparse-applicative takes care of reading and validating the arguments passed to the command line, handling and reporting errors, generating a usage line, a comprehensive help screen, and enabling context-sensitive bash, zsh, and fish completions. A value of type Parser a represents a specification for a set of options, which will yield a value of type a when the command line arguments are successfully parsed. If you are familiar with parser combinator libraries like parsec, attoparsec, or the json parser aeson you will feel right at home with optparse-applicative. If not, don't worry! All you really need to learn are a few basic parsers, and how to compose them as instances of Applicative and Alternative.

Features

  • The parser is built using an applicative style starting from a set of basic combinators
  • The greet function is the entry point of the program
  • optparse-applicative provides a number of primitive parsers, corresponding to different posix style options
  • Options with an argument such as target are referred to as regular options
  • Combine the target and quiet into a single parser that accepts both options and returns a combined value
  • Builders allow you to define parsers using a convenient combinator-based syntax

Project Samples

Project Activity

See All Activity >

Categories

XML Parsers

License

BSD License

Follow optparse-applicative

optparse-applicative Web Site

Other Useful Business Software
SoftCo: Enterprise Invoice and P2P Automation Software Icon
SoftCo: Enterprise Invoice and P2P Automation Software

For companies that process over 20,000 invoices per year

SoftCo Accounts Payable Automation processes all PO and non-PO supplier invoices electronically from capture and matching through to invoice approval and query management. SoftCoAP delivers unparalleled touchless automation by embedding AI across matching, coding, routing, and exception handling to minimize the number of supplier invoices requiring manual intervention. The result is 89% processing savings, supported by a context-aware AI Assistant that helps users understand exceptions, answer questions, and take the right action faster.
Learn More
Rate This Project
Login To Rate This Project

User Reviews

Be the first to post a review of optparse-applicative!

Additional Project Details

Programming Language

Haskell

Related Categories

Haskell XML Parsers

Registered

2023-04-05