syntax-0.2.0.0: Abstract syntax descriptions for parsing and pretty-printing.

Copyright(c) Paweł Nowak
LicenseMIT
MaintainerPaweł Nowak <pawel834@gmail.com>
Stabilityexperimental
Safe HaskellNone
LanguageHaskell2010

Data.Syntax.Combinator

Description

Combinators that work with any sequence type.

Synopsis

Documentation

sepBy :: SemiIsoAlternative f => f a -> f () -> f [a] Source

Zero or more occurences of v separated by s.

sepBy1 :: SemiIsoAlternative f => f a -> f () -> f [a] Source

One or more occurences of v separated by s.

optional :: SemiIsoAlternative f => f a -> f (Maybe a) Source

One or none occurences of f.

opt :: SemiIsoAlternative f => f () -> f () Source

Like optional, but specialized for ().

opt_ :: SemiIsoAlternative f => f () -> f () Source

Parser one or more occurences of f, but prints nothing.