configurator-export
Pretty printer and exporter for configurations fromthe "configurator" library.
http://github.com/mstksg/configurator-export
LTS Haskell 23.27: | 0.1.0.1 |
Stackage Nightly 2025-07-12: | 0.1.0.1 |
Latest on Hackage: | 0.1.0.1 |
configurator-export-0.1.0.1@sha256:d97be5e02b891d7a8b9ebf2fa2694ad23c8dc59119baa50eb2eea088aa75e093,2911
Module documentation for 0.1.0.1
- Data
- Data.Configurator
configurator-export
Pretty printers and exporters for ‘Config’s from the greatconfigurator library.
All results are intended to be valid parsing files in the configuration filesyntax of the library.
For a full round trip:
main = do cfg <- load [Required "config.cfg"] writeConf "config.cfg" cfg
This should load the config file, parse it, and then re-export it, rewritingthe original config file. The result should be an identical configurationfile (with keys potentially re-arranged and re-sorted, comments removed, etc.)
Can also export/print anyHashMap Name Value
, in the form exported from aConfig
usinggetMap
. Modify a map yourself to dynicallygenerate/customize configuration files!
Sample output:
foo { bar { baz1 = true baz2 = [1, 0.6, "hello", true] } aardvark = "banana" monkey = [true, false, 1.9e-3] zebra = 24}foo2 { bar = 8.1e-8}apple = ["cake", true]orange = 8943
Further configuration on sorting of keys, displaying of bools and floats, etc.is possible by passing in customConfStyle
style option values.
Changes
Changelog
v0.1.0.1
https://github.com/mstksg/configurator-export/releases/tag/v0.1.0.1
- Added support for backwards compatibility up to GHC 7.6
v0.1.0.0
https://github.com/mstksg/configurator-export/releases/tag/v0.1.0.0
- Initial release!