Safe Haskell | None |
---|---|
Language | Haskell2010 |
This module provides an implementation of the relapse validation language.
Relapse is intended to be used for validation of trees or filtering of lists of trees.
Katydid currently provides two types of trees out of the box: Json and XML, but relapse supports any type of tree as long the type is of the Tree typeclass provided by the Parsers module.
The validate and filter functions expects a Tree to be a list of trees, since not all serialization formats have a single root. For example, valid json like "[1, 2]" does not have a single root. Relapse can also validate these types of trees. If your tree has a single root, simply provide a singleton list as input.
Documentation
parseGrammar :: String -> Except String Refs Source #
parseGrammar parses the relapse grammar and returns either a parsed grammar (Refs, for the list of references) or an error string.