Annotations-0.2.1: Constructing, analyzing and destructing annotated trees

Safe HaskellNone
LanguageHaskell98

Annotations.MultiRec.ParserCombinators

Synopsis

Documentation

type YP s fam m = P s (YieldT Bounds fam m) Source

A parser that yields its components, annotated with Bounds.

mkBounded :: (Fam fam, EqS fam, HFunctor fam (PF fam), Monad m) => fam a -> Range -> a -> YP s fam m a Source

Given the left margin of a structure, asks the parser for the right margin and wraps the position information around the root of the tree.

unit :: (Fam fam, EqS fam, HFunctor fam (PF fam), Monad m) => fam a -> YP s fam m a -> YP s fam m a Source

Wrap an unnotated tree with position information from the parse state.

chainr :: (Fam fam, EqS fam, HFunctor fam (PF fam), Monad m, Show a) => fam a -> YP s fam m a -> YP s fam m (a -> a -> a) -> YP s fam m a Source

Parse right-recursive structures.

chainl :: (Fam fam, EqS fam, HFunctor fam (PF fam), Monad m, Show a) => fam a -> YP s fam m a -> YP s fam m (a -> a -> a) -> YP s fam m a Source

Parse left-recursive structures.