Very simple config file reading

Version on this page:1.3
LTS Haskell 11.1:1.3
Stackage Nightly 2018-03-23:1.3
Latest on Hackage:1.3

See all snapshots tce-conf appears in

BSD3 licensed by Dino Morelli
Maintained by Dino Morelli

Module documentation for 1.3



Very simple config file reading (Haskell)


This package contains modules for runtime reading of very simple config files of the key=value style or as a Haskell data structure to be deserialized with Read. The modules support files with blank lines and simple single-line comments, but nothing else.



  • Well-known key=value config file syntax
  • Adding new entries doesn't necessarily mean code changes as they are stored in a Map


  • All values are String and so may as well be untyped. Conversion to other types will be required by users of the library.
  • Simulating hierarchies requires hacky key syntax with dots or what-have-you
  • Only single-line comments supported at this time, with #
  • No support for INI sections or variable substitution



  • Config files are strongly typed Haskell source code. Read instancing takes care of everything!
  • Can easily support hierarchical data because Haskell data types do so


  • Config files must adhere to Haskell source syntax (may not be a con for some)
  • Changing the config file at all requires code changes to keep the types synced with each other.
  • Only single-line comments supported at this time, with --
  • No support for variable substitution

Getting source

  • Get the source with darcs: $ darcs get
  • If you're just looking, browse the source

And once you have it, building the usual way:

$ stack build
$ stack test


Dino Morelli <>


1.3 (2016-10-10)

  • Added missing files to extra-source-files

1.2 (2016-10-09)

  • Fixed cabal file for use with stack sdist
  • Fixed cabal file formatting
  • Updated cabal-version in cabal file
  • Replaced fmap with <$> everywhere
  • Updated build instructions to be stack-specific
  • Cleaned up auto-generated cruft in stack.yaml
  • Merged example sub-project into the main project
  • Moved tested-with up to ghc 8.0.1
  • Moved copyright up to 2016
  • Changed build from cabal to stack
  • Updated README

1.1 (2015-03-27)

  • Updated and expanded documentation
  • Added buildable example project
  • Added ReadConf module
  • Renamed SimpleConf to KVConf
  • KVConf: Can now have whitespace around the = symbol in conf files

1.0 (2015-03-23)

  • Initial release
Depends on 3 packages:
Used by 1 package:
comments powered byDisqus