herb-0.1.0.0: Accessible format for structured data serialization
Safe HaskellSafe-Inferred
LanguageHaskell2010

Data.Herb.Parser

Description

Attoparsec parser for Herb accompanied by a simple compatible formatter.

Synopsis

Documentation

herb :: Parser Herb Source #

Parser for a single Herb term compatible with Data.Attoparsec.Text. The parsed format is exactly the one produced by formatHerb.

decodeHerb :: FromHerb a => Text -> Either String a Source #

Parse Text into a single Herb structure (reverse of formatHerb).

To avoid actual parsing into a data structure and decode into "plain Herb", use getPlainHerb.

herbFile :: Parser [Herb] Source #

Parser for multiple Herb terms in a file as with herb, possibly separated by blanks.

decodeHerbFile :: FromHerb a => Text -> Either String [a] Source #

Parse Text that contains multiple structures into a list of Herbs.