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]


Automatic Flags

Build a small example program


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


Maintainer's Corner

Package maintainers

For package maintainers and hackage trustees


  • No Candidates
Versions [RSS],,
Dependencies base (>=4.14 && <4.18), envy (>=2.1 && <2.2), rio (>=0.1 && <0.2), say (>=0.1 && <0.2), tonaparser [details]
License MIT
Copyright 2018 Kadzuya Okamoto
Author Kadzuya Okamoto, Dennis Gosnell
Category Library, System, Tonatona
Home page
Bug tracker
Source repo head: git clone
Uploaded by arowM at 2023-08-29T14:17:43Z
Reverse Dependencies 6 direct, 0 indirect [details]
Executables tonaparser-example
Downloads 989 total (17 in the last 30 days)
Rating (no votes yet) [estimated by Bayesian average]
Your Rating
  • λ
  • λ
  • λ
Status Docs available [build log]
Last success reported on 2023-08-29 [all 1 reports]

Readme for tonaparser-

[back to package description]


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=5 stack exec tonaparser-example -- --bar-baz foo
Foo {foo = 5, bar = Bar {baz = "foo"}}