Simple, layout-based value language similar to YAML or JSON

Latest on Hackage:0.5

This package is not currently in any snapshots. If you're interested in using it, we recommend adding it to Stackage Nightly. Doing so will make builds more reliable, and allow to host generated Haddocks.

MIT licensed by Eric Mertens
Maintained by


Build Status

This package implements a simple, layout-based value definition language used for supplying configuration values to various applications.


-- Line comments until newline
      {} -- empty section


    {- Block comments
       {- nested comments -}
       "O'caml style {- strings in comments"
       so you can comment out otherwise valid
       portions of your config
    atoms      : yes

    decimal    : -1234
    hexadecimal: 0x1234
    octal      : 0o1234
    binary     : 0b1010
    floating   : 12.34e56

   * sections: in-lists
     next-section: still-in-list
   * [ "inline", "lists" ]
   * * "nestable"
     * "layout"
     * "lists"
   * 3

unicode : "standard Haskell format strings (1 ≤ 2)\x2228(2 ≤ 3)"


The language supports: Strings, Atoms, Integers, Lists, Nested Sections.

Sections are layout based. The contents of a section must be indented further than the section heading. The whitespace between a section heading and its colon is not significant. Section names must start with a letter and may contain letters, numbers, dashes (-), underscores (_), and periods (.).

Lists are either layout based with * prefixes or inline surrounded by [ and ] delimited by ,

Strings are surrounded by " and use Haskell-style escapes.

Numbers support decimal, hexadecimal (0x), octal (0o), and binary (0b).

Atoms follow the same lexical rule as section heading.



  • Add support for floating-point numbers

  • Internal lexer and parser improvements
  • Added support for \& escape sequence

  • Loosen version constraints to build back to GHC 7.4.2
  • Remove unused bytestring dependency


  • Make Atom a newtype to help distinguish it from Text
  • Add values traversal for traversing individual elements of a list


  • Replace yes and no with generalized atoms
  • Add character index to error position
  • Add human readable error messages


  • Take Text as the input to parse


  • Added Config.Lens module
  • Added aligned fields to pretty printer


  • Initial release
Depends on:
Used by 2 packages:
comments powered byDisqus