incremental-parser-0.2: Generic parser library capable of providing partial results from partial input.

Safe HaskellSafe-Infered

Control.Applicative.Monoid

Description

This module defines the AlternativeMonoid class

Documentation

class Applicative f => MonoidApplicative f whereSource

Methods

(><) :: Monoid a => f a -> f a -> f aSource

Join operator on parsers of same type, preserving the incremental results.

Instances

class (Alternative f, MonoidApplicative f) => MonoidAlternative f whereSource

Methods

moptional :: Monoid a => f a -> f aSource

Like optional, but restricted to Monoid results.

concatMany :: Monoid a => f a -> f aSource

Zero or more argument occurrences like many, but concatenated.

concatSome :: Monoid a => f a -> f aSource

One or more argument occurrences like some, but concatenated.

Instances

(Alternative (Parser a s), Monoid s) => MonoidAlternative (Parser a s)

Zero or more argument occurrences like many, but matches the longest possible input sequence.