ConfigFileTH: Template haskell for reading ConfigFiles.

[ library, parsing, template-haskell ] [ Propose Tags ] [ Report a vulnerability ]

This module provides syntax for concise definitions of config files from Data.ConfigFile through template haskell. For example, the following splice, $(genConf Example [$conf| elbow/center -> ec :: Double elbow/min -> emi :: Double elbow/max -> ema :: Double |]) resolves into declaration of the following datatype data Example = Example {ec :: Double ,emi :: Double ,ema :: Double} and a function loadExample :: (MonadIO m) => FilePath -> m (Either CPError Example) , which uses Data.ConfigFile to read a values for the above struct from a file.

Modules

[Index]

Downloads

Maintainer's Corner

Package maintainers

For package maintainers and hackage trustees

Candidates

  • No Candidates
Versions [RSS] 0.1, 0.2
Dependencies base (>=4.3 && <5), ConfigFile (>=1.0.6 && <2), parsec (>=3.1.0 && <4), template-haskell [details]
License LicenseRef-LGPL
Author Ville Tirronen
Maintainer Ville Tirronen <ville.e.t.tirronen@jyu.fi>
Category Parsing, Template Haskell
Uploaded by VilleTirronen at 2011-12-05T08:44:44Z
Distributions
Reverse Dependencies 1 direct, 0 indirect [details]
Downloads 2252 total (10 in the last 30 days)
Rating (no votes yet) [estimated by Bayesian average]
Your Rating
  • λ
  • λ
  • λ
Status Docs uploaded by user
Build status unknown [no reports yet]