tonaparser: Scalable way to pass runtime configurations for tonatona

[ library, mit, system, tonatona ] [ Propose Tags ]

Tonaparser provides a way to pass runtime configurations. This library is supposed to be used with tonatona.


[Skip to Readme]
Versions [faq] 0.1.0.0
Dependencies base (>=4.7 && <5), envy (>=1.5), rio (>=0.1), say (>=0.1), tonaparser [details]
License MIT
Copyright 2018 Kadzuya Okamoto
Author Kadzuya Okamoto, Dennis Gosnell
Maintainer arow.okamoto+github@gmail.com
Category Library, System, Tonatona
Home page https://github.com/tonatona-project/tonatona#readme
Bug tracker https://github.com/tonatona-project/tonatona/issues
Source repo head: git clone https://github.com/tonatona-project/tonatona
Uploaded by arowM at Fri Jan 25 14:39:35 UTC 2019
Distributions NixOS:0.1.0.0, Stackage:0.1.0.0
Executables tonaparser-example
Downloads 72 total (15 in the last 30 days)
Rating (no votes yet) [estimated by rule of succession]
Your Rating
  • λ
  • λ
  • λ
Status Hackage Matrix CI
Docs available [build log]
Last success reported on 2019-01-25 [all 1 reports]

Modules

[Index] [Quick Jump]

Flags

NameDescriptionDefaultType
buildexample

Build a small example program

DisabledAutomatic

Use -f <flag> to enable a flag, or -f -<flag> to disable that flag. More info

Downloads

Maintainer's Corner

For package maintainers and hackage trustees


Readme for tonaparser-0.1.0.0

[back to package description]

tonaparser

Integrated parser library created for tonatona meta application framework.

It can construct system configuration from environment variables, command line arguments, and any IO values depends on them. See details for example/Main.hs.

Build example app

$ stack build --pedantic --flag tonaparser:buildexample tonaparser

Then check how it works with various command line options and environment variables.

$ stack exec tonaparser-example -- --new-foo 3 --bar-baz foo
Foo {foo = 3, bar = Bar {baz = "foo"}}

$ stack exec tonaparser-example -- --new-foo 3
Foo {foo = 3, bar = Bar {baz = "baz"}}

$ stack exec tonaparser-example -- --foo 3 --bar-baz foo
tonaparser-example: No required configuration for "Configuration for Foo.foo"

$ FOO=5 stack exec tonaparser-example -- --bar-baz foo
Foo {foo = 5, bar = Bar {baz = "foo"}}