The commander package
An extensible, format-agnostic command parsing library designed to be easy to use and syntactically light weight.
Assuming we write a parser to convert a command such as
calculator add 1 2 -v=yes
Into path and flags such as [calculator, add] and Map.fromList [(v,yes)], This library will then match said path and flags against a nested record type of commands built up using lightweight monadic syntax and tries to execute the associated function if the matching and value converting works, or returns an error if the path/flags fail to match any command.
To get started, see the documentation for the Commander module below. Additionally, an examples folder is included in the source illustrating usage - see https:github.comjsdwhs-commander for more.
[Skip to Readme]
|Dependencies||base (>=4.8 && <5), commander, containers (==0.5.*), mtl (==2.2.*), transformers (>=0.4.2 && <0.5) [details]|
|Copyright||(c) 2016 James Wilson|
|Source repository||head: git clone https://github.com/jsdw/hs-commander|
|Uploaded||Fri Mar 11 19:59:08 UTC 2016 by jsdw|
|Downloads||63 total (4 in the last 30 days)|
|Status||Docs available [build log]
Last success reported on 2016-03-11 [all 1 reports]
Hackage Matrix CI
For package maintainers and hackage trustees