The minimal-configuration package

[Tags: bsd3, library]

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'

Properties

Versions0.1, 0.1.1
Dependenciesbase (>=4.5 && <=4.8), containers (<=0.5.6), directory (<=1.2.1.0), filepath (<=1.3.0.2), tconfig (==0.5.2)
LicenseBSD3
AuthorMarius Ghita
Maintainermhitza@gmail.com
CategorySystem, Configuration
Source repositoryhead: git clone https://github.com/mhitza/minimal-configuration
UploadedSun Mar 30 14:34:05 UTC 2014 by MariusGhita
UpdatedSat Jan 31 22:14:45 UTC 2015 by MariusGhita to revision 1
DistributionsNixOS:0.1.1
Downloads281 total (14 in last 30 days)
StatusDocs available [build log]
Successful builds reported [all 1 reports]

Modules

[Index]

Downloads

Maintainers' corner

For package maintainers and hackage trustees