@hackage config-ini0.1.2.0
A library for simple INI-based configuration files.
Installation
Dependencies (5)
- base >=4.7 && <4.10
- megaparsec >=5.1.2 && <5.2
- text >=1.2.2 && <1.3
- transformers >=0.4.1 && <0.6
- unordered-containers >=0.2.7 && <0.3 Show all…
Dependents (12)
@hackage/rhbzquery, @hackage/heddit, @hackage/zre, @hackage/animascii, @hackage/fbrnch, @hackage/do-spaces, Show all…
Package Flags
build-examples
(off by default)
Build example applications
The config-ini library is a small monadic language
for writing simple configuration languages with convenient,
human-readable error messages.
parseConfig :: IniParser (Text, Int, Bool) parseConfig = section "NETWORK" $ do user <- field "user" port <- fieldOf "port" number enc <- fieldFlagDef "encryption" True return (user, port, enc)