packages feed

grammatical-parsers 0.7.2 → 0.7.2.1

raw patch · 5 files changed

+49/−14 lines, 5 filesdep ~containersPVP: major bump suggested

API removals or changes: PVP suggests a major version bump

Dependency ranges changed: containers

API changes (from Hackage documentation)

- Text.Grampa: class Parsing m => LookAheadParsing (m :: Type -> Type)
- Text.Grampa: lookAhead :: LookAheadParsing m => m a -> m a
- Text.Grampa: type family ParserPosition (m :: Type -> Type);
+ Text.Grampa: ($dmgetSourcePos) :: (InputParsing m, FactorialMonoid (ParserInput m), Functor m, ParserPosition m ~ Down Int) => m (ParserPosition m)
+ Text.Grampa: ($dmidentifier) :: (LexicalParsing m, TextualMonoid (ParserInput m)) => m (ParserInput m)
+ Text.Grampa: ($dmkeyword) :: (LexicalParsing m, Show (ParserInput m), TextualMonoid (ParserInput m)) => ParserInput m -> m ()
+ Text.Grampa: ($dmsatisfy) :: (InputParsing m, Monad m) => (ParserInput m -> Bool) -> m (ParserInput m)
+ Text.Grampa: ($dmscan) :: (InputParsing m, Monad m, FactorialMonoid (ParserInput m)) => state -> (state -> ParserInput m -> Maybe state) -> m (ParserInput m)
+ Text.Grampa: ($dmscanChars) :: (InputCharParsing m, Monad m, TextualMonoid (ParserInput m)) => state -> (state -> Char -> Maybe state) -> m (ParserInput m)
+ Text.Grampa: ($dmstring) :: (InputParsing m, Monad m, LeftReductive (ParserInput m), FactorialMonoid (ParserInput m), Show (ParserInput m)) => ParserInput m -> m (ParserInput m)
+ Text.Grampa: ($dmtakeCharsWhile) :: (InputCharParsing m, Monad m, TextualMonoid (ParserInput m)) => (Char -> Bool) -> m (ParserInput m)
+ Text.Grampa: ($dmtakeCharsWhile1) :: (InputCharParsing m, Monad m, TextualMonoid (ParserInput m)) => (Char -> Bool) -> m (ParserInput m)
+ Text.Grampa: ($dmtakeWhile) :: (InputParsing m, Monad m, FactorialMonoid (ParserInput m)) => (ParserInput m -> Bool) -> m (ParserInput m)
+ Text.Grampa: ($dmtakeWhile1) :: (InputParsing m, Monad m, FactorialMonoid (ParserInput m)) => (ParserInput m -> Bool) -> m (ParserInput m)
+ Text.Grampa: ($dmunexpected) :: forall (t :: (Type -> Type) -> Type -> Type) (n :: Type -> Type) a. (Parsing m, MonadTrans t, Monad n, Parsing n, m ~ t n) => String -> m a
+ Text.Grampa: type ParserInput (m :: Type -> Type);
- Text.Grampa: class Alternative m => AmbiguousParsing m
+ Text.Grampa: class Alternative m => AmbiguousParsing (m :: Type -> Type)
- Text.Grampa: class Alternative m => CommittedParsing m where {
+ Text.Grampa: class Alternative m => CommittedParsing (m :: Type -> Type) where {
- Text.Grampa: class MultiParsing m => GrammarParsing m where {
+ Text.Grampa: class MultiParsing m => GrammarParsing (m :: Type -> Type) where {
- Text.Grampa: class (DeterministicParsing m, InputCharParsing m, TokenParsing m) => LexicalParsing m
+ Text.Grampa: class (DeterministicParsing m, InputCharParsing m, TokenParsing m) => LexicalParsing (m :: Type -> Type)
- Text.Grampa: class InputParsing m => MultiParsing m where {
+ Text.Grampa: class InputParsing m => MultiParsing (m :: Type -> Type) where {
- Text.Grampa: class InputParsing m => TraceableParsing m
+ Text.Grampa: class InputParsing m => TraceableParsing (m :: Type -> Type)
- Text.Grampa: failureDescription :: forall s pos. (Ord s, TextualMonoid s, Position pos) => s -> ParseFailure pos s -> Int -> s
+ Text.Grampa: failureDescription :: (Ord s, TextualMonoid s, Position pos) => s -> ParseFailure pos s -> Int -> s
- Text.Grampa: identifier :: (LexicalParsing m, TextualMonoid (ParserInput m)) => m (ParserInput m)
+ Text.Grampa: identifier :: LexicalParsing m => m (ParserInput m)
- Text.Grampa: keyword :: (LexicalParsing m, Show (ParserInput m), TextualMonoid (ParserInput m)) => ParserInput m -> m ()
+ Text.Grampa: keyword :: LexicalParsing m => ParserInput m -> m ()
- Text.Grampa: overlay :: (GrammarParsing m, g ~ ParserGrammar m, GrammarConstraint m g, Distributive g, Foldable f) => (g m -> g m) -> f (GrammarOverlay g m) -> g m
+ Text.Grampa: overlay :: forall (m :: Type -> Type) g f. (GrammarParsing m, g ~ ParserGrammar m, GrammarConstraint m g, Distributive g, Foldable f) => (g m -> g m) -> f (GrammarOverlay g m) -> g m
- Text.Grampa: type CommittedResults m :: Type -> Type;
+ Text.Grampa: type CommittedResults (m :: Type -> Type) :: Type -> Type;
- Text.Grampa: type Grammar (g :: (Type -> Type) -> Type) p s = g (p g s)
+ Text.Grampa: type Grammar (g :: Type -> Type -> Type) (p :: Type -> Type -> Type -> Type -> Type -> Type) s = g p g s
- Text.Grampa: type GrammarBuilder (g :: (Type -> Type) -> Type) (g' :: (Type -> Type) -> Type) (p :: ((Type -> Type) -> Type) -> Type -> Type -> Type) (s :: Type) = g (p g' s) -> g (p g' s)
+ Text.Grampa: type GrammarBuilder (g :: Type -> Type -> Type) (g' :: Type -> Type -> Type) (p :: Type -> Type -> Type -> Type -> Type -> Type) s = g p g' s -> g p g' s
- Text.Grampa: type GrammarConstraint m g = Functor g;
+ Text.Grampa: type GrammarConstraint m :: Type -> Type g :: Type -> Type -> Type = Functor g;
- Text.Grampa: type GrammarFunctor m :: Type -> Type;
+ Text.Grampa: type GrammarFunctor (m :: Type -> Type) :: Type -> Type;
- Text.Grampa: type GrammarOverlay (g :: (Type -> Type) -> Type) (m :: Type -> Type) = g m -> g m -> g m
+ Text.Grampa: type GrammarOverlay (g :: Type -> Type -> Type) (m :: Type -> Type) = g m -> g m -> g m
- Text.Grampa: type ParseResults s = Either (ParseFailure Pos s)
+ Text.Grampa: type ParseResults s = Either ParseFailure Pos s
- Text.Grampa: type ParserGrammar m :: (Type -> Type) -> Type;
+ Text.Grampa: type ParserGrammar (m :: Type -> Type) :: Type -> Type -> Type;
- Text.Grampa: type ResultFunctor m :: Type -> Type;
+ Text.Grampa: type ResultFunctor (m :: Type -> Type) :: Type -> Type;
- Text.Grampa.ContextFree.Continued: Parser :: (forall x. s -> (r -> s -> (ParseFailure Pos s -> x) -> x) -> (ParseFailure Pos s -> x) -> x) -> Parser (g :: (Type -> Type) -> Type) s r
+ Text.Grampa.ContextFree.Continued: Parser :: (forall x. () => s -> (r -> s -> (ParseFailure Pos s -> x) -> x) -> (ParseFailure Pos s -> x) -> x) -> Parser (g :: (Type -> Type) -> Type) s r
- Text.Grampa.ContextFree.Continued: [applyParser] :: Parser (g :: (Type -> Type) -> Type) s r -> forall x. s -> (r -> s -> (ParseFailure Pos s -> x) -> x) -> (ParseFailure Pos s -> x) -> x
+ Text.Grampa.ContextFree.Continued: [applyParser] :: Parser (g :: (Type -> Type) -> Type) s r -> forall x. () => s -> (r -> s -> (ParseFailure Pos s -> x) -> x) -> (ParseFailure Pos s -> x) -> x
- Text.Grampa.ContextFree.Continued: alt :: forall g s a. Ord s => Parser g s a -> Parser g s a -> Parser g s a
+ Text.Grampa.ContextFree.Continued: alt :: forall (g :: (Type -> Type) -> Type) s a. Ord s => Parser g s a -> Parser g s a -> Parser g s a
- Text.Grampa.ContextFree.Continued: data Result (g :: (Type -> Type) -> Type) s v
+ Text.Grampa.ContextFree.Continued: data Result (g :: Type -> Type -> Type) s v
- Text.Grampa.ContextFree.Continued: newtype Parser (g :: (Type -> Type) -> Type) s r
+ Text.Grampa.ContextFree.Continued: newtype Parser (g :: Type -> Type -> Type) s r
- Text.Grampa.ContextFree.Memoizing: Parser :: ([(s, g (ResultList g s))] -> ResultList g s r) -> Parser g s r
+ Text.Grampa.ContextFree.Memoizing: Parser :: ([(s, g (ResultList g s))] -> ResultList g s r) -> Parser (g :: (Type -> Type) -> Type) s r
- Text.Grampa.ContextFree.Memoizing: ResultList :: !BinTree (ResultInfo g s r) -> ParseFailure Pos s -> ResultList g s r
+ Text.Grampa.ContextFree.Memoizing: ResultList :: !BinTree (ResultInfo g s r) -> ParseFailure Pos s -> ResultList (g :: (Type -> Type) -> Type) s r
- Text.Grampa.ContextFree.Memoizing: [applyParser] :: Parser g s r -> [(s, g (ResultList g s))] -> ResultList g s r
+ Text.Grampa.ContextFree.Memoizing: [applyParser] :: Parser (g :: (Type -> Type) -> Type) s r -> [(s, g (ResultList g s))] -> ResultList g s r
- Text.Grampa.ContextFree.Memoizing: data ResultList g s r
+ Text.Grampa.ContextFree.Memoizing: data ResultList (g :: Type -> Type -> Type) s r
- Text.Grampa.ContextFree.Memoizing: newtype Parser g s r
+ Text.Grampa.ContextFree.Memoizing: newtype Parser (g :: Type -> Type -> Type) s r
- Text.Grampa.ContextFree.Memoizing: terminalPEG :: (Monoid s, Ord s) => Parser g s a -> Parser g s a
+ Text.Grampa.ContextFree.Memoizing: terminalPEG :: forall s (g :: (Type -> Type) -> Type) a. (Monoid s, Ord s) => Parser g s a -> Parser g s a
- Text.Grampa.ContextFree.Memoizing.LeftRecursive: BackParser :: p g s a -> SeparatedParser p (g :: (Type -> Type) -> Type) s a
+ Text.Grampa.ContextFree.Memoizing.LeftRecursive: BackParser :: p g s a -> SeparatedParser (p :: ((Type -> Type) -> Type) -> Type -> Type -> Type) (g :: (Type -> Type) -> Type) s a
- Text.Grampa.ContextFree.Memoizing.LeftRecursive: CycleParser :: p g s a -> p g s a -> ResultAppend p g s a -> Dependencies g -> SeparatedParser p (g :: (Type -> Type) -> Type) s a
+ Text.Grampa.ContextFree.Memoizing.LeftRecursive: CycleParser :: p g s a -> p g s a -> ResultAppend p g s a -> Dependencies g -> SeparatedParser (p :: ((Type -> Type) -> Type) -> Type -> Type -> Type) (g :: (Type -> Type) -> Type) s a
- Text.Grampa.ContextFree.Memoizing.LeftRecursive: FrontParser :: p g s a -> SeparatedParser p (g :: (Type -> Type) -> Type) s a
+ Text.Grampa.ContextFree.Memoizing.LeftRecursive: FrontParser :: p g s a -> SeparatedParser (p :: ((Type -> Type) -> Type) -> Type -> Type -> Type) (g :: (Type -> Type) -> Type) s a
- Text.Grampa.ContextFree.Memoizing.LeftRecursive: [appendResultsArrow] :: SeparatedParser p (g :: (Type -> Type) -> Type) s a -> ResultAppend p g s a
+ Text.Grampa.ContextFree.Memoizing.LeftRecursive: [appendResultsArrow] :: SeparatedParser (p :: ((Type -> Type) -> Type) -> Type -> Type -> Type) (g :: (Type -> Type) -> Type) s a -> ResultAppend p g s a
- Text.Grampa.ContextFree.Memoizing.LeftRecursive: [backParser] :: SeparatedParser p (g :: (Type -> Type) -> Type) s a -> p g s a
+ Text.Grampa.ContextFree.Memoizing.LeftRecursive: [backParser] :: SeparatedParser (p :: ((Type -> Type) -> Type) -> Type -> Type -> Type) (g :: (Type -> Type) -> Type) s a -> p g s a
- Text.Grampa.ContextFree.Memoizing.LeftRecursive: [cycleParser] :: SeparatedParser p (g :: (Type -> Type) -> Type) s a -> p g s a
+ Text.Grampa.ContextFree.Memoizing.LeftRecursive: [cycleParser] :: SeparatedParser (p :: ((Type -> Type) -> Type) -> Type -> Type -> Type) (g :: (Type -> Type) -> Type) s a -> p g s a
- Text.Grampa.ContextFree.Memoizing.LeftRecursive: [dependencies] :: SeparatedParser p (g :: (Type -> Type) -> Type) s a -> Dependencies g
+ Text.Grampa.ContextFree.Memoizing.LeftRecursive: [dependencies] :: SeparatedParser (p :: ((Type -> Type) -> Type) -> Type -> Type -> Type) (g :: (Type -> Type) -> Type) s a -> Dependencies g
- Text.Grampa.ContextFree.Memoizing.LeftRecursive: autochain :: forall p g s f rl (cb :: Type -> Type). (cb ~ Const (g (Const Bool)), f ~ GrammarFunctor (p g s), f ~ rl s, LeftRecParsing p g s rl, DeterministicParsing (p g s), Apply g, Traversable g, Distributive g, Logistic g) => g (Fixed p g s) -> g (Fixed p g s)
+ Text.Grampa.ContextFree.Memoizing.LeftRecursive: autochain :: forall (p :: ((Type -> Type) -> Type) -> Type -> Type -> Type) g s (f :: Type -> Type) (rl :: Type -> Type -> Type) (cb :: Type -> Type). (cb ~ (Const (g (Const Bool :: Type -> Type)) :: Type -> Type), f ~ GrammarFunctor (p g s), f ~ rl s, LeftRecParsing p g s rl, DeterministicParsing (p g s), Apply g, Traversable g, Distributive g, Logistic g) => g (Fixed p g s) -> g (Fixed p g s)
- Text.Grampa.ContextFree.Memoizing.LeftRecursive: data Fixed p g s a
+ Text.Grampa.ContextFree.Memoizing.LeftRecursive: data Fixed (p :: Type -> Type -> Type -> Type -> Type -> Type) (g :: Type -> Type -> Type) s a
- Text.Grampa.ContextFree.Memoizing.LeftRecursive: data SeparatedParser p (g :: (Type -> Type) -> Type) s a
+ Text.Grampa.ContextFree.Memoizing.LeftRecursive: data SeparatedParser (p :: Type -> Type -> Type -> Type -> Type -> Type) (g :: Type -> Type -> Type) s a
- Text.Grampa.ContextFree.Memoizing.LeftRecursive: liftPositive :: p g s a -> Fixed p g s a
+ Text.Grampa.ContextFree.Memoizing.LeftRecursive: liftPositive :: forall p (g :: (Type -> Type) -> Type) s a. p g s a -> Fixed p g s a
- Text.Grampa.ContextFree.Memoizing.LeftRecursive: liftPure :: Alternative (p g s) => p g s a -> Fixed p g s a
+ Text.Grampa.ContextFree.Memoizing.LeftRecursive: liftPure :: forall p (g :: (Type -> Type) -> Type) s a. Alternative (p g s) => p g s a -> Fixed p g s a
- Text.Grampa.ContextFree.Memoizing.LeftRecursive: mapPrimitive :: forall p g s a b. AmbiguityDecidable b => (p g s a -> p g s b) -> Fixed p g s a -> Fixed p g s b
+ Text.Grampa.ContextFree.Memoizing.LeftRecursive: mapPrimitive :: forall p (g :: (Type -> Type) -> Type) s a b. AmbiguityDecidable b => (p g s a -> p g s b) -> Fixed p g s a -> Fixed p g s b
- Text.Grampa.ContextFree.Memoizing.LeftRecursive: parseSeparated :: forall p g rl s. (Apply g, Foldable g, Eq s, FactorialMonoid s, LeftReductive s, TailsParsing (p g s), GrammarConstraint (p g s) g, GrammarFunctor (p g s) ~ rl s, FallibleResults rl, s ~ ParserInput (p g s)) => g (SeparatedParser p g s) -> s -> [(s, g (GrammarFunctor (p g s)))]
+ Text.Grampa.ContextFree.Memoizing.LeftRecursive: parseSeparated :: forall (p :: ((Type -> Type) -> Type) -> Type -> Type -> Type) g (rl :: Type -> Type -> Type) s. (Apply g, Foldable g, Eq s, FactorialMonoid s, LeftReductive s, TailsParsing (p g s), GrammarConstraint (p g s) g, GrammarFunctor (p g s) ~ rl s, FallibleResults rl, s ~ ParserInput (p g s)) => g (SeparatedParser p g s) -> s -> [(s, g (GrammarFunctor (p g s)))]
- Text.Grampa.ContextFree.Memoizing.LeftRecursive: separated :: forall p g s. (Alternative (p g s), Apply g, Distributive g, Traversable g, AmbiguousAlternative (GrammarFunctor (p g s))) => g (Fixed p g s) -> g (SeparatedParser p g s)
+ Text.Grampa.ContextFree.Memoizing.LeftRecursive: separated :: forall (p :: ((Type -> Type) -> Type) -> Type -> Type -> Type) g s. (Alternative (p g s), Apply g, Distributive g, Traversable g, AmbiguousAlternative (GrammarFunctor (p g s))) => g (Fixed p g s) -> g (SeparatedParser p g s)
- Text.Grampa.ContextFree.Memoizing.LeftRecursive: terminalPEG :: (Monoid s, Ord s) => Fixed Parser g s a -> Fixed Parser g s a
+ Text.Grampa.ContextFree.Memoizing.LeftRecursive: terminalPEG :: forall s (g :: (Type -> Type) -> Type) a. (Monoid s, Ord s) => Fixed Parser g s a -> Fixed Parser g s a
- Text.Grampa.ContextFree.Parallel: data Parser (g :: (Type -> Type) -> Type) s r
+ Text.Grampa.ContextFree.Parallel: data Parser (g :: Type -> Type -> Type) s r
- Text.Grampa.ContextFree.SortedMemoizing: Parser :: ([(s, g (ResultList g s))] -> ResultList g s r) -> Parser g s r
+ Text.Grampa.ContextFree.SortedMemoizing: Parser :: ([(s, g (ResultList g s))] -> ResultList g s r) -> Parser (g :: (Type -> Type) -> Type) s r
- Text.Grampa.ContextFree.SortedMemoizing: ResultList :: ![ResultsOfLength g s r] -> ParseFailure Pos s -> ResultList g s r
+ Text.Grampa.ContextFree.SortedMemoizing: ResultList :: ![ResultsOfLength g s r] -> ParseFailure Pos s -> ResultList (g :: (Type -> Type) -> Type) s r
- Text.Grampa.ContextFree.SortedMemoizing: [applyParser] :: Parser g s r -> [(s, g (ResultList g s))] -> ResultList g s r
+ Text.Grampa.ContextFree.SortedMemoizing: [applyParser] :: Parser (g :: (Type -> Type) -> Type) s r -> [(s, g (ResultList g s))] -> ResultList g s r
- Text.Grampa.ContextFree.SortedMemoizing: data ResultList g s r
+ Text.Grampa.ContextFree.SortedMemoizing: data ResultList (g :: Type -> Type -> Type) s r
- Text.Grampa.ContextFree.SortedMemoizing: newtype Parser g s r
+ Text.Grampa.ContextFree.SortedMemoizing: newtype Parser (g :: Type -> Type -> Type) s r
- Text.Grampa.ContextFree.SortedMemoizing: terminalPEG :: Monoid s => Ord s => Parser g s a -> Parser g s a
+ Text.Grampa.ContextFree.SortedMemoizing: terminalPEG :: forall s (g :: (Type -> Type) -> Type) a. (Monoid s, Ord s) => Parser g s a -> Parser g s a
- Text.Grampa.ContextFree.SortedMemoizing.LeftRecursive: BackParser :: p g s a -> SeparatedParser p (g :: (Type -> Type) -> Type) s a
+ Text.Grampa.ContextFree.SortedMemoizing.LeftRecursive: BackParser :: p g s a -> SeparatedParser (p :: ((Type -> Type) -> Type) -> Type -> Type -> Type) (g :: (Type -> Type) -> Type) s a
- Text.Grampa.ContextFree.SortedMemoizing.LeftRecursive: CycleParser :: p g s a -> p g s a -> ResultAppend p g s a -> Dependencies g -> SeparatedParser p (g :: (Type -> Type) -> Type) s a
+ Text.Grampa.ContextFree.SortedMemoizing.LeftRecursive: CycleParser :: p g s a -> p g s a -> ResultAppend p g s a -> Dependencies g -> SeparatedParser (p :: ((Type -> Type) -> Type) -> Type -> Type -> Type) (g :: (Type -> Type) -> Type) s a
- Text.Grampa.ContextFree.SortedMemoizing.LeftRecursive: FrontParser :: p g s a -> SeparatedParser p (g :: (Type -> Type) -> Type) s a
+ Text.Grampa.ContextFree.SortedMemoizing.LeftRecursive: FrontParser :: p g s a -> SeparatedParser (p :: ((Type -> Type) -> Type) -> Type -> Type -> Type) (g :: (Type -> Type) -> Type) s a
- Text.Grampa.ContextFree.SortedMemoizing.LeftRecursive: [appendResultsArrow] :: SeparatedParser p (g :: (Type -> Type) -> Type) s a -> ResultAppend p g s a
+ Text.Grampa.ContextFree.SortedMemoizing.LeftRecursive: [appendResultsArrow] :: SeparatedParser (p :: ((Type -> Type) -> Type) -> Type -> Type -> Type) (g :: (Type -> Type) -> Type) s a -> ResultAppend p g s a
- Text.Grampa.ContextFree.SortedMemoizing.LeftRecursive: [backParser] :: SeparatedParser p (g :: (Type -> Type) -> Type) s a -> p g s a
+ Text.Grampa.ContextFree.SortedMemoizing.LeftRecursive: [backParser] :: SeparatedParser (p :: ((Type -> Type) -> Type) -> Type -> Type -> Type) (g :: (Type -> Type) -> Type) s a -> p g s a
- Text.Grampa.ContextFree.SortedMemoizing.LeftRecursive: [cycleParser] :: SeparatedParser p (g :: (Type -> Type) -> Type) s a -> p g s a
+ Text.Grampa.ContextFree.SortedMemoizing.LeftRecursive: [cycleParser] :: SeparatedParser (p :: ((Type -> Type) -> Type) -> Type -> Type -> Type) (g :: (Type -> Type) -> Type) s a -> p g s a
- Text.Grampa.ContextFree.SortedMemoizing.LeftRecursive: [dependencies] :: SeparatedParser p (g :: (Type -> Type) -> Type) s a -> Dependencies g
+ Text.Grampa.ContextFree.SortedMemoizing.LeftRecursive: [dependencies] :: SeparatedParser (p :: ((Type -> Type) -> Type) -> Type -> Type -> Type) (g :: (Type -> Type) -> Type) s a -> Dependencies g
- Text.Grampa.ContextFree.SortedMemoizing.LeftRecursive: autochain :: forall p g s f rl (cb :: Type -> Type). (cb ~ Const (g (Const Bool)), f ~ GrammarFunctor (p g s), f ~ rl s, LeftRecParsing p g s rl, DeterministicParsing (p g s), Apply g, Traversable g, Distributive g, Logistic g) => g (Fixed p g s) -> g (Fixed p g s)
+ Text.Grampa.ContextFree.SortedMemoizing.LeftRecursive: autochain :: forall (p :: ((Type -> Type) -> Type) -> Type -> Type -> Type) g s (f :: Type -> Type) (rl :: Type -> Type -> Type) (cb :: Type -> Type). (cb ~ (Const (g (Const Bool :: Type -> Type)) :: Type -> Type), f ~ GrammarFunctor (p g s), f ~ rl s, LeftRecParsing p g s rl, DeterministicParsing (p g s), Apply g, Traversable g, Distributive g, Logistic g) => g (Fixed p g s) -> g (Fixed p g s)
- Text.Grampa.ContextFree.SortedMemoizing.LeftRecursive: data Fixed p g s a
+ Text.Grampa.ContextFree.SortedMemoizing.LeftRecursive: data Fixed (p :: Type -> Type -> Type -> Type -> Type -> Type) (g :: Type -> Type -> Type) s a
- Text.Grampa.ContextFree.SortedMemoizing.LeftRecursive: data SeparatedParser p (g :: (Type -> Type) -> Type) s a
+ Text.Grampa.ContextFree.SortedMemoizing.LeftRecursive: data SeparatedParser (p :: Type -> Type -> Type -> Type -> Type -> Type) (g :: Type -> Type -> Type) s a
- Text.Grampa.ContextFree.SortedMemoizing.LeftRecursive: liftPositive :: p g s a -> Fixed p g s a
+ Text.Grampa.ContextFree.SortedMemoizing.LeftRecursive: liftPositive :: forall p (g :: (Type -> Type) -> Type) s a. p g s a -> Fixed p g s a
- Text.Grampa.ContextFree.SortedMemoizing.LeftRecursive: liftPure :: Alternative (p g s) => p g s a -> Fixed p g s a
+ Text.Grampa.ContextFree.SortedMemoizing.LeftRecursive: liftPure :: forall p (g :: (Type -> Type) -> Type) s a. Alternative (p g s) => p g s a -> Fixed p g s a
- Text.Grampa.ContextFree.SortedMemoizing.LeftRecursive: mapPrimitive :: forall p g s a b. AmbiguityDecidable b => (p g s a -> p g s b) -> Fixed p g s a -> Fixed p g s b
+ Text.Grampa.ContextFree.SortedMemoizing.LeftRecursive: mapPrimitive :: forall p (g :: (Type -> Type) -> Type) s a b. AmbiguityDecidable b => (p g s a -> p g s b) -> Fixed p g s a -> Fixed p g s b
- Text.Grampa.ContextFree.SortedMemoizing.LeftRecursive: parseSeparated :: forall p g rl s. (Apply g, Foldable g, Eq s, FactorialMonoid s, LeftReductive s, TailsParsing (p g s), GrammarConstraint (p g s) g, GrammarFunctor (p g s) ~ rl s, FallibleResults rl, s ~ ParserInput (p g s)) => g (SeparatedParser p g s) -> s -> [(s, g (GrammarFunctor (p g s)))]
+ Text.Grampa.ContextFree.SortedMemoizing.LeftRecursive: parseSeparated :: forall (p :: ((Type -> Type) -> Type) -> Type -> Type -> Type) g (rl :: Type -> Type -> Type) s. (Apply g, Foldable g, Eq s, FactorialMonoid s, LeftReductive s, TailsParsing (p g s), GrammarConstraint (p g s) g, GrammarFunctor (p g s) ~ rl s, FallibleResults rl, s ~ ParserInput (p g s)) => g (SeparatedParser p g s) -> s -> [(s, g (GrammarFunctor (p g s)))]
- Text.Grampa.ContextFree.SortedMemoizing.LeftRecursive: separated :: forall p g s. (Alternative (p g s), Apply g, Distributive g, Traversable g, AmbiguousAlternative (GrammarFunctor (p g s))) => g (Fixed p g s) -> g (SeparatedParser p g s)
+ Text.Grampa.ContextFree.SortedMemoizing.LeftRecursive: separated :: forall (p :: ((Type -> Type) -> Type) -> Type -> Type -> Type) g s. (Alternative (p g s), Apply g, Distributive g, Traversable g, AmbiguousAlternative (GrammarFunctor (p g s))) => g (Fixed p g s) -> g (SeparatedParser p g s)
- Text.Grampa.ContextFree.SortedMemoizing.LeftRecursive: terminalPEG :: (Monoid s, Ord s) => Fixed Parser g s a -> Fixed Parser g s a
+ Text.Grampa.ContextFree.SortedMemoizing.LeftRecursive: terminalPEG :: forall s (g :: (Type -> Type) -> Type) a. (Monoid s, Ord s) => Fixed Parser g s a -> Fixed Parser g s a
- Text.Grampa.ContextFree.SortedMemoizing.Transformer: Parser :: ([(s, g (ResultListT m g s))] -> ResultListT m g s r) -> ParserT m g s r
+ Text.Grampa.ContextFree.SortedMemoizing.Transformer: Parser :: ([(s, g (ResultListT m g s))] -> ResultListT m g s r) -> ParserT (m :: Type -> Type) (g :: (Type -> Type) -> Type) s r
- Text.Grampa.ContextFree.SortedMemoizing.Transformer: ROL :: !Int -> ![(s, g (ResultListT m g s))] -> !NonEmpty a -> ResultsOfLength m g s a
+ Text.Grampa.ContextFree.SortedMemoizing.Transformer: ROL :: !Int -> ![(s, g (ResultListT m g s))] -> !NonEmpty a -> ResultsOfLength (m :: Type -> Type) (g :: (Type -> Type) -> Type) s a
- Text.Grampa.ContextFree.SortedMemoizing.Transformer: ResultList :: ![ResultsOfLengthT m g s r] -> ParseFailure Pos s -> ResultListT m g s r
+ Text.Grampa.ContextFree.SortedMemoizing.Transformer: ResultList :: ![ResultsOfLengthT m g s r] -> ParseFailure Pos s -> ResultListT (m :: Type -> Type) (g :: (Type -> Type) -> Type) s r
- Text.Grampa.ContextFree.SortedMemoizing.Transformer: ResultsOfLengthT :: ResultsOfLength m g s (m r) -> ResultsOfLengthT m g s r
+ Text.Grampa.ContextFree.SortedMemoizing.Transformer: ResultsOfLengthT :: ResultsOfLength m g s (m r) -> ResultsOfLengthT (m :: Type -> Type) (g :: (Type -> Type) -> Type) s r
- Text.Grampa.ContextFree.SortedMemoizing.Transformer: [applyParser] :: ParserT m g s r -> [(s, g (ResultListT m g s))] -> ResultListT m g s r
+ Text.Grampa.ContextFree.SortedMemoizing.Transformer: [applyParser] :: ParserT (m :: Type -> Type) (g :: (Type -> Type) -> Type) s r -> [(s, g (ResultListT m g s))] -> ResultListT m g s r
- Text.Grampa.ContextFree.SortedMemoizing.Transformer: [getResultsOfLength] :: ResultsOfLengthT m g s r -> ResultsOfLength m g s (m r)
+ Text.Grampa.ContextFree.SortedMemoizing.Transformer: [getResultsOfLength] :: ResultsOfLengthT (m :: Type -> Type) (g :: (Type -> Type) -> Type) s r -> ResultsOfLength m g s (m r)
- Text.Grampa.ContextFree.SortedMemoizing.Transformer: data ResultListT m g s r
+ Text.Grampa.ContextFree.SortedMemoizing.Transformer: data ResultListT (m :: Type -> Type) (g :: Type -> Type -> Type) s r
- Text.Grampa.ContextFree.SortedMemoizing.Transformer: data ResultsOfLength m g s a
+ Text.Grampa.ContextFree.SortedMemoizing.Transformer: data ResultsOfLength (m :: Type -> Type) (g :: Type -> Type -> Type) s a
- Text.Grampa.ContextFree.SortedMemoizing.Transformer: lift :: Ord s => m a -> ParserT m g s a
+ Text.Grampa.ContextFree.SortedMemoizing.Transformer: lift :: forall s m a (g :: (Type -> Type) -> Type). Ord s => m a -> ParserT m g s a
- Text.Grampa.ContextFree.SortedMemoizing.Transformer: newtype ParserT m g s r
+ Text.Grampa.ContextFree.SortedMemoizing.Transformer: newtype ParserT (m :: Type -> Type) (g :: Type -> Type -> Type) s r
- Text.Grampa.ContextFree.SortedMemoizing.Transformer: newtype ResultsOfLengthT m g s r
+ Text.Grampa.ContextFree.SortedMemoizing.Transformer: newtype ResultsOfLengthT (m :: Type -> Type) (g :: Type -> Type -> Type) s r
- Text.Grampa.ContextFree.SortedMemoizing.Transformer: peg :: (Applicative m, Ord s) => Parser g [(s, g (ResultListT m g s))] a -> ParserT m g s a
+ Text.Grampa.ContextFree.SortedMemoizing.Transformer: peg :: forall (m :: Type -> Type) s g a. (Applicative m, Ord s) => Parser g [(s, g (ResultListT m g s))] a -> ParserT m g s a
- Text.Grampa.ContextFree.SortedMemoizing.Transformer: tbind :: Monad m => ParserT m g s a -> (a -> m b) -> ParserT m g s b
+ Text.Grampa.ContextFree.SortedMemoizing.Transformer: tbind :: forall m (g :: (Type -> Type) -> Type) s a b. Monad m => ParserT m g s a -> (a -> m b) -> ParserT m g s b
- Text.Grampa.ContextFree.SortedMemoizing.Transformer: terminalPEG :: (Applicative m, Monoid s, Ord s) => Parser g s a -> ParserT m g s a
+ Text.Grampa.ContextFree.SortedMemoizing.Transformer: terminalPEG :: forall (m :: Type -> Type) s (g :: (Type -> Type) -> Type) a. (Applicative m, Monoid s, Ord s) => Parser g s a -> ParserT m g s a
- Text.Grampa.ContextFree.SortedMemoizing.Transformer: tmap :: (m a -> m b) -> ParserT m g s a -> ParserT m g s b
+ Text.Grampa.ContextFree.SortedMemoizing.Transformer: tmap :: forall m a b (g :: (Type -> Type) -> Type) s. (m a -> m b) -> ParserT m g s a -> ParserT m g s b
- Text.Grampa.ContextFree.SortedMemoizing.Transformer.LeftRecursive: BackParser :: p g s a -> SeparatedParser p (g :: (Type -> Type) -> Type) s a
+ Text.Grampa.ContextFree.SortedMemoizing.Transformer.LeftRecursive: BackParser :: p g s a -> SeparatedParser (p :: ((Type -> Type) -> Type) -> Type -> Type -> Type) (g :: (Type -> Type) -> Type) s a
- Text.Grampa.ContextFree.SortedMemoizing.Transformer.LeftRecursive: CycleParser :: p g s a -> p g s a -> ResultAppend p g s a -> Dependencies g -> SeparatedParser p (g :: (Type -> Type) -> Type) s a
+ Text.Grampa.ContextFree.SortedMemoizing.Transformer.LeftRecursive: CycleParser :: p g s a -> p g s a -> ResultAppend p g s a -> Dependencies g -> SeparatedParser (p :: ((Type -> Type) -> Type) -> Type -> Type -> Type) (g :: (Type -> Type) -> Type) s a
- Text.Grampa.ContextFree.SortedMemoizing.Transformer.LeftRecursive: FrontParser :: p g s a -> SeparatedParser p (g :: (Type -> Type) -> Type) s a
+ Text.Grampa.ContextFree.SortedMemoizing.Transformer.LeftRecursive: FrontParser :: p g s a -> SeparatedParser (p :: ((Type -> Type) -> Type) -> Type -> Type -> Type) (g :: (Type -> Type) -> Type) s a
- Text.Grampa.ContextFree.SortedMemoizing.Transformer.LeftRecursive: [appendResultsArrow] :: SeparatedParser p (g :: (Type -> Type) -> Type) s a -> ResultAppend p g s a
+ Text.Grampa.ContextFree.SortedMemoizing.Transformer.LeftRecursive: [appendResultsArrow] :: SeparatedParser (p :: ((Type -> Type) -> Type) -> Type -> Type -> Type) (g :: (Type -> Type) -> Type) s a -> ResultAppend p g s a
- Text.Grampa.ContextFree.SortedMemoizing.Transformer.LeftRecursive: [backParser] :: SeparatedParser p (g :: (Type -> Type) -> Type) s a -> p g s a
+ Text.Grampa.ContextFree.SortedMemoizing.Transformer.LeftRecursive: [backParser] :: SeparatedParser (p :: ((Type -> Type) -> Type) -> Type -> Type -> Type) (g :: (Type -> Type) -> Type) s a -> p g s a
- Text.Grampa.ContextFree.SortedMemoizing.Transformer.LeftRecursive: [cycleParser] :: SeparatedParser p (g :: (Type -> Type) -> Type) s a -> p g s a
+ Text.Grampa.ContextFree.SortedMemoizing.Transformer.LeftRecursive: [cycleParser] :: SeparatedParser (p :: ((Type -> Type) -> Type) -> Type -> Type -> Type) (g :: (Type -> Type) -> Type) s a -> p g s a
- Text.Grampa.ContextFree.SortedMemoizing.Transformer.LeftRecursive: [dependencies] :: SeparatedParser p (g :: (Type -> Type) -> Type) s a -> Dependencies g
+ Text.Grampa.ContextFree.SortedMemoizing.Transformer.LeftRecursive: [dependencies] :: SeparatedParser (p :: ((Type -> Type) -> Type) -> Type -> Type -> Type) (g :: (Type -> Type) -> Type) s a -> Dependencies g
- Text.Grampa.ContextFree.SortedMemoizing.Transformer.LeftRecursive: autochain :: forall p g s f rl (cb :: Type -> Type). (cb ~ Const (g (Const Bool)), f ~ GrammarFunctor (p g s), f ~ rl s, LeftRecParsing p g s rl, DeterministicParsing (p g s), Apply g, Traversable g, Distributive g, Logistic g) => g (Fixed p g s) -> g (Fixed p g s)
+ Text.Grampa.ContextFree.SortedMemoizing.Transformer.LeftRecursive: autochain :: forall (p :: ((Type -> Type) -> Type) -> Type -> Type -> Type) g s (f :: Type -> Type) (rl :: Type -> Type -> Type) (cb :: Type -> Type). (cb ~ (Const (g (Const Bool :: Type -> Type)) :: Type -> Type), f ~ GrammarFunctor (p g s), f ~ rl s, LeftRecParsing p g s rl, DeterministicParsing (p g s), Apply g, Traversable g, Distributive g, Logistic g) => g (Fixed p g s) -> g (Fixed p g s)
- Text.Grampa.ContextFree.SortedMemoizing.Transformer.LeftRecursive: data SeparatedParser p (g :: (Type -> Type) -> Type) s a
+ Text.Grampa.ContextFree.SortedMemoizing.Transformer.LeftRecursive: data SeparatedParser (p :: Type -> Type -> Type -> Type -> Type -> Type) (g :: Type -> Type -> Type) s a
- Text.Grampa.ContextFree.SortedMemoizing.Transformer.LeftRecursive: lift :: (Applicative m, Ord s) => m a -> ParserT m g s a
+ Text.Grampa.ContextFree.SortedMemoizing.Transformer.LeftRecursive: lift :: forall m s a (g :: (Type -> Type) -> Type). (Applicative m, Ord s) => m a -> ParserT m g s a
- Text.Grampa.ContextFree.SortedMemoizing.Transformer.LeftRecursive: liftPositive :: p g s a -> Fixed p g s a
+ Text.Grampa.ContextFree.SortedMemoizing.Transformer.LeftRecursive: liftPositive :: forall p (g :: (Type -> Type) -> Type) s a. p g s a -> Fixed p g s a
- Text.Grampa.ContextFree.SortedMemoizing.Transformer.LeftRecursive: parseSeparated :: forall p g rl s. (Apply g, Foldable g, Eq s, FactorialMonoid s, LeftReductive s, TailsParsing (p g s), GrammarConstraint (p g s) g, GrammarFunctor (p g s) ~ rl s, FallibleResults rl, s ~ ParserInput (p g s)) => g (SeparatedParser p g s) -> s -> [(s, g (GrammarFunctor (p g s)))]
+ Text.Grampa.ContextFree.SortedMemoizing.Transformer.LeftRecursive: parseSeparated :: forall (p :: ((Type -> Type) -> Type) -> Type -> Type -> Type) g (rl :: Type -> Type -> Type) s. (Apply g, Foldable g, Eq s, FactorialMonoid s, LeftReductive s, TailsParsing (p g s), GrammarConstraint (p g s) g, GrammarFunctor (p g s) ~ rl s, FallibleResults rl, s ~ ParserInput (p g s)) => g (SeparatedParser p g s) -> s -> [(s, g (GrammarFunctor (p g s)))]
- Text.Grampa.ContextFree.SortedMemoizing.Transformer.LeftRecursive: separated :: forall p g s. (Alternative (p g s), Apply g, Distributive g, Traversable g, AmbiguousAlternative (GrammarFunctor (p g s))) => g (Fixed p g s) -> g (SeparatedParser p g s)
+ Text.Grampa.ContextFree.SortedMemoizing.Transformer.LeftRecursive: separated :: forall (p :: ((Type -> Type) -> Type) -> Type -> Type -> Type) g s. (Alternative (p g s), Apply g, Distributive g, Traversable g, AmbiguousAlternative (GrammarFunctor (p g s))) => g (Fixed p g s) -> g (SeparatedParser p g s)
- Text.Grampa.ContextFree.SortedMemoizing.Transformer.LeftRecursive: tbind :: (Monad m, AmbiguityDecidable b) => ParserT m g s a -> (a -> m b) -> ParserT m g s b
+ Text.Grampa.ContextFree.SortedMemoizing.Transformer.LeftRecursive: tbind :: forall m b (g :: (Type -> Type) -> Type) s a. (Monad m, AmbiguityDecidable b) => ParserT m g s a -> (a -> m b) -> ParserT m g s b
- Text.Grampa.ContextFree.SortedMemoizing.Transformer.LeftRecursive: tmap :: AmbiguityDecidable b => (m a -> m b) -> ParserT m g s a -> ParserT m g s b
+ Text.Grampa.ContextFree.SortedMemoizing.Transformer.LeftRecursive: tmap :: forall b m a (g :: (Type -> Type) -> Type) s. AmbiguityDecidable b => (m a -> m b) -> ParserT m g s a -> ParserT m g s b
- Text.Grampa.ContextFree.SortedMemoizing.Transformer.LeftRecursive: type ParserT m = Fixed (ParserT m)
+ Text.Grampa.ContextFree.SortedMemoizing.Transformer.LeftRecursive: type ParserT (m :: Type -> Type) = Fixed ParserT m
- Text.Grampa.PEG.Backtrack: Parser :: (s -> Result g s r) -> Parser g s r
+ Text.Grampa.PEG.Backtrack: Parser :: (s -> Result g s r) -> Parser (g :: (Type -> Type) -> Type) s r
- Text.Grampa.PEG.Backtrack: [applyParser] :: Parser g s r -> s -> Result g s r
+ Text.Grampa.PEG.Backtrack: [applyParser] :: Parser (g :: (Type -> Type) -> Type) s r -> s -> Result g s r
- Text.Grampa.PEG.Backtrack: alt :: Parser g s a -> Parser g s a -> Parser g s a
+ Text.Grampa.PEG.Backtrack: alt :: forall (g :: (Type -> Type) -> Type) s a. Parser g s a -> Parser g s a -> Parser g s a
- Text.Grampa.PEG.Backtrack: data Result (g :: (Type -> Type) -> Type) s v
+ Text.Grampa.PEG.Backtrack: data Result (g :: Type -> Type -> Type) s v
- Text.Grampa.PEG.Backtrack: newtype Parser g s r
+ Text.Grampa.PEG.Backtrack: newtype Parser (g :: Type -> Type -> Type) s r
- Text.Grampa.PEG.Packrat: NoParse :: {-# UNPACK #-} !ParseFailure Pos s -> Result g s v
+ Text.Grampa.PEG.Packrat: NoParse :: {-# UNPACK #-} !ParseFailure Pos s -> Result (g :: (Type -> Type) -> Type) s v
- Text.Grampa.PEG.Packrat: Parsed :: !v -> ![(s, g (Result g s))] -> Result g s v
+ Text.Grampa.PEG.Packrat: Parsed :: !v -> ![(s, g (Result g s))] -> Result (g :: (Type -> Type) -> Type) s v
- Text.Grampa.PEG.Packrat: Parser :: ([(s, g (Result g s))] -> Result g s r) -> Parser g s r
+ Text.Grampa.PEG.Packrat: Parser :: ([(s, g (Result g s))] -> Result g s r) -> Parser (g :: (Type -> Type) -> Type) s r
- Text.Grampa.PEG.Packrat: [applyParser] :: Parser g s r -> [(s, g (Result g s))] -> Result g s r
+ Text.Grampa.PEG.Packrat: [applyParser] :: Parser (g :: (Type -> Type) -> Type) s r -> [(s, g (Result g s))] -> Result g s r
- Text.Grampa.PEG.Packrat: [parsedPrefix] :: Result g s v -> !v
+ Text.Grampa.PEG.Packrat: [parsedPrefix] :: Result (g :: (Type -> Type) -> Type) s v -> !v
- Text.Grampa.PEG.Packrat: [parsedSuffix] :: Result g s v -> ![(s, g (Result g s))]
+ Text.Grampa.PEG.Packrat: [parsedSuffix] :: Result (g :: (Type -> Type) -> Type) s v -> ![(s, g (Result g s))]
- Text.Grampa.PEG.Packrat: data Result g s v
+ Text.Grampa.PEG.Packrat: data Result (g :: Type -> Type -> Type) s v
- Text.Grampa.PEG.Packrat: newtype Parser g s r
+ Text.Grampa.PEG.Packrat: newtype Parser (g :: Type -> Type -> Type) s r

Files

CHANGELOG.md view
@@ -1,3 +1,9 @@+Version 0.7.2.1+---------------+* Updated CI configuration+* Improved Haddock documentation+* Removed the unused containers dependency from library and bumped it in tests and executables+ Version 0.7.2 --------------- * Added `Combinators.takeSomeNonEmpty`
README.md view
@@ -107,4 +107,6 @@ [Combined](https://github.com/blamario/grampa/blob/master/grammatical-parsers/examples/Combined.hs) module.  For more conventional tastes there are monolithic examples of-[Lua](https://github.com/blamario/language-lua2/blob/master/src/Language/Lua/Grammar.hs) and [Oberon](http://hackage.haskell.org/package/language-oberon) grammars as well.+[Lua](https://github.com/blamario/language-lua2/blob/master/src/Language/Lua/Grammar.hs),+[Modula-2](https://hackage.haskell.org/package/language-Modula2), and+[Oberon](http://hackage.haskell.org/package/language-oberon) grammars as well.
grammatical-parsers.cabal view
@@ -1,5 +1,5 @@ name:                grammatical-parsers-version:             0.7.2+version:             0.7.2.1 synopsis:            parsers that combine into grammars description:   /Gram/matical-/pa/rsers, or Grampa for short, is a library of parser types whose values are meant to be assigned@@ -16,7 +16,7 @@ category:            Text, Parsing build-type:          Custom cabal-version:       >=1.10-tested-with:         GHC==9.8.2, GHC==9.6.4, GHC==9.4.8, GHC==9.2.8, GHC==9.0.2, GHC==8.10.7+tested-with:         GHC==9.12.1, GHC==9.10.1, GHC==9.8.2, GHC==9.6.4, GHC==9.4.8, GHC==9.2.8, GHC==9.0.2, GHC==8.10.7 extra-source-files:  README.md, CHANGELOG.md source-repository head   type:              git@@ -49,7 +49,6 @@   default-language:    Haskell2010   ghc-options:         -Wall   build-depends:       base >=4.9 && <5,-                       containers >= 0.4 && < 0.8,                        transformers >= 0.5 && < 0.7,                        monoid-subclasses >=1.0 && <1.3,                        parsers < 0.13,@@ -63,7 +62,7 @@   main-is:             Main.hs   other-modules:       Arithmetic, Boolean, Combined, Comparisons, Conditionals, Lambda, Utilities   default-language:    Haskell2010-  build-depends:       base >=4.9 && <5, containers >= 0.5.7.0 && < 0.8,+  build-depends:       base >=4.9 && <5, containers >= 0.5.7.0 && < 0.9,                        parsers < 0.13,                        rank2classes >= 1.0.2 && < 1.6, grammatical-parsers,                        monoid-subclasses@@ -73,7 +72,7 @@   main-is:             BooleanTransformations.hs   other-modules:       Boolean, Utilities   default-language:    Haskell2010-  build-depends:       base >=4.9 && <5, containers >= 0.5.7.0 && < 0.8,+  build-depends:       base >=4.9 && <5, containers >= 0.5.7.0 && < 0.9,                        parsers < 0.13,                        rank2classes >= 1.0.2 && < 1.6, grammatical-parsers,                        monoid-subclasses@@ -82,7 +81,7 @@   type:              exitcode-stdio-1.0   hs-source-dirs:    test, examples   x-uses-tf:         true-  build-depends:     base >=4.9 && < 5, containers >= 0.5.7.0 && < 0.8,+  build-depends:     base >=4.9 && < 5, containers >= 0.5.7.0 && < 0.9,                      monoid-subclasses, parsers < 0.13,                      witherable >= 0.4 && < 0.6,                      rank2classes >= 1.0.2 && < 1.6, grammatical-parsers,@@ -109,7 +108,7 @@   ghc-options:       -O2 -Wall -rtsopts -main-is Benchmark.main   Build-Depends:     base >=4.9 && < 5, rank2classes >= 1.0.2 && < 1.6, grammatical-parsers,                      monoid-subclasses, parsers < 0.13,-                     criterion >= 1.0, deepseq >= 1.1, containers >= 0.5.7.0 && < 0.8, text >= 1.1+                     criterion >= 1.0, deepseq >= 1.1, containers >= 0.5.7.0 && < 0.9, text >= 1.1   main-is:           Benchmark.hs   other-modules:     Main, Arithmetic, Boolean, Combined, Comparisons, Conditionals, Lambda, Utilities   default-language:  Haskell2010
src/Text/Grampa.hs view
@@ -1,5 +1,31 @@--- | A collection of parsing algorithms with a common interface, operating on grammars represented as records with--- rank-2 field types.+-- | This library consists of a collection of parsing algorithms and a common interface for representing grammars as+-- records with rank-2 field types.+--+-- To implement a grammar, first determine if it is a context-free grammar or perhaps a parsing expression grammar. In+-- the latter case, you should import your parser type from either "Text.Grampa.PEG.Backtrack" or the+-- "Text.Grampa.PEG.Packrat" module. The former is faster on simple grammars but may require exponential time on more+-- complex cases. The Packrat parser on the other hand guarantees linear time complexity but has more overhead and+-- consumes more memory.+--+-- If your grammar is context-free, there are more possibilities to choose from:+--+-- * If the grammar is neither left-recursive nor ambiguous, you can import your parser type from+--   "Text.Grampa.ContextFree.Continued".+-- * If the grammar is ambiguous and you need to see all the results, there's "Text.Grampa.ContextFree.Parallel".+-- * For a complex but non-left-recursive grammar, you can use "Text.Grampa.ContextFree.SortedMemoizing".+-- * If you need to carry a monadic computation, there's "Text.Grampa.ContextFree.SortedMemoizing.Transformer".+-- * If the grammar is left-recursive, "Text.Grampa.ContextFree.SortedMemoizing.LeftRecursive" is the ticket.+-- * If the grammar is left-recursive /and/ you require monadic context, the final option is+--   "Text.Grampa.ContextFree.SortedMemoizing.Transformer.LeftRecursive".+--+-- Regardless of the chosen parer type, you'll construct your grammar the same way. A grammar is a set of productions+-- using the same parser type, collected and abstracted inside a rank-2 record type. Each production is built using+-- the standard parser combinators from the usual 'Applicative' and 'Alternative' classes, plus some additional+-- [classes](#g:classes) provided by this library. The 'Monad' operations are available as well, but should not be+-- used in left-recursive positions.+--+-- Once the grammar is complete, you can use 'parseComplete' or 'parsePrefix' to apply it to your input.+ {-# LANGUAGE FlexibleContexts, KindSignatures, OverloadedStrings, RankNTypes, ScopedTypeVariables,              TypeFamilies, TypeOperators #-} module Text.Grampa (@@ -7,7 +33,7 @@    failureDescription, simply,    -- * Types    Grammar, GrammarBuilder, GrammarOverlay, ParseResults, ParseFailure(..), FailureDescription(..), Ambiguous(..), Pos,-   -- * Classes+   -- * Classes #classes#    -- ** Parsing    DeterministicParsing(..), AmbiguousParsing(..), CommittedParsing(..), TraceableParsing(..),    LexicalParsing(..),@@ -83,8 +109,8 @@ simply :: (Rank2.Only r (p (Rank2.Only r) s) -> s -> Rank2.Only r f) -> p (Rank2.Only r) s r -> s -> f r simply parseGrammar p input = Rank2.fromOnly (parseGrammar (Rank2.Only p) input) --- | Given the textual parse input, the parse failure on the input, and the number of lines preceding the failure to--- show, produce a human-readable failure description.+-- | Given the textual parse input, the parse failure on the input, and the number of preceding lines of context you+-- want to show, produce a human-readable failure description. failureDescription :: forall s pos. (Ord s, TextualMonoid s, Position pos) => s -> ParseFailure pos s -> Int -> s failureDescription input (ParseFailure pos (FailureDescription expected inputs) erroneous) contextLineCount =    Position.context input pos contextLineCount
test/README.lhs view
@@ -107,4 +107,6 @@ [Combined](https://github.com/blamario/grampa/blob/master/grammatical-parsers/examples/Combined.hs) module.  For more conventional tastes there are monolithic examples of-[Lua](https://github.com/blamario/language-lua2/blob/master/src/Language/Lua/Grammar.hs) and [Oberon](http://hackage.haskell.org/package/language-oberon) grammars as well.+[Lua](https://github.com/blamario/language-lua2/blob/master/src/Language/Lua/Grammar.hs),+[Modula-2](https://hackage.haskell.org/package/language-Modula2), and+[Oberon](http://hackage.haskell.org/package/language-oberon) grammars as well.