minimal-configuration: Minimal ini like configuration library with a few extras
The module exported provides the ability to manage a configuration file in the users home directory (or the Windows equivalent). Where the configuration takes the form of key=value, without sections, that for example an '.ini' would have.
The library simplifies serilization/deserialization of the configuration into
a structure similar in behavior to a Map
, as well as an interactive way to
fill in values for simple cases.
Consider the following example, where a user would run the application for the first time, it would ask him for his name; however on a followup run it would just print a greeting with his name.
import System.Config.File main = withConfiguration ".apprc" $ \conf -> do let name = getV conf "name" case name of Just n -> putStrLn $ "hello " ++ n Nothing -> do conf' <- fillInteractively conf [("name", acceptNonBlank)] saveConfiguration conf'
Downloads
- minimal-configuration-0.1.1.tar.gz [browse] (Cabal source package)
- Package description (revised from the package)
Note: This package has metadata revisions in the cabal description newer than included in the tarball. To unpack the package including the revisions, use 'cabal get'.
Maintainer's Corner
For package maintainers and hackage trustees
Candidates
- No Candidates
Versions [RSS] | 0.1, 0.1.1, 0.1.2, 0.1.3, 0.1.4 (info) |
---|---|
Dependencies | base (>=4.5 && <=4.8), containers (<=0.5.6), directory (<=1.2.1.0), filepath (<=1.3.0.2), tconfig (==0.5.2) [details] |
License | BSD-3-Clause |
Author | Marius Ghita |
Maintainer | mhitza@gmail.com |
Revised | Revision 1 made by MariusGhita at 2015-01-31T22:14:45Z |
Category | System, Configuration |
Source repo | head: git clone https://github.com/mhitza/minimal-configuration |
Uploaded | by MariusGhita at 2014-03-30T14:34:05Z |
Distributions | LTSHaskell:0.1.4, NixOS:0.1.4, Stackage:0.1.4 |
Reverse Dependencies | 1 direct, 0 indirect [details] |
Downloads | 3345 total (25 in the last 30 days) |
Rating | (no votes yet) [estimated by Bayesian average] |
Your Rating | |
Status | Docs available [build log] Successful builds reported [all 1 reports] |