parsix-0.1.0.3: Parser combinators with slicing, error recovery, and syntax highlighting

Safe HaskellNone
LanguageHaskell2010

Text.Parsix.Combinators

Contents

Synopsis

Documentation

class Parsing m => SliceParsing m where Source #

Minimal complete definition

slicedWith

Methods

slicedWith :: (a -> Text -> b) -> m a -> m b Source #

position :: m Position Source #

position :: (MonadTrans t, Monad n, SliceParsing n, m ~ t n) => m Position Source #

Instances
SliceParsing Parser Source # 
Instance details

Defined in Text.Parsix.Combinators

Methods

slicedWith :: (a -> Text -> b) -> Parser a -> Parser b Source #

position :: Parser Position Source #

(SliceParsing m, MonadPlus m) => SliceParsing (IdentityT m) Source # 
Instance details

Defined in Text.Parsix.Combinators

Methods

slicedWith :: (a -> Text -> b) -> IdentityT m a -> IdentityT m b Source #

position :: IdentityT m Position Source #

(SliceParsing m, MonadPlus m) => SliceParsing (StateT s m) Source # 
Instance details

Defined in Text.Parsix.Combinators

Methods

slicedWith :: (a -> Text -> b) -> StateT s m a -> StateT s m b Source #

position :: StateT s m Position Source #

(SliceParsing m, MonadPlus m) => SliceParsing (StateT s m) Source # 
Instance details

Defined in Text.Parsix.Combinators

Methods

slicedWith :: (a -> Text -> b) -> StateT s m a -> StateT s m b Source #

position :: StateT s m Position Source #

(SliceParsing m, MonadPlus m, Monoid w) => SliceParsing (WriterT w m) Source # 
Instance details

Defined in Text.Parsix.Combinators

Methods

slicedWith :: (a -> Text -> b) -> WriterT w m a -> WriterT w m b Source #

position :: WriterT w m Position Source #

(SliceParsing m, MonadPlus m, Monoid w) => SliceParsing (WriterT w m) Source # 
Instance details

Defined in Text.Parsix.Combinators

Methods

slicedWith :: (a -> Text -> b) -> WriterT w m a -> WriterT w m b Source #

position :: WriterT w m Position Source #

(SliceParsing m, MonadPlus m) => SliceParsing (ReaderT e m) Source # 
Instance details

Defined in Text.Parsix.Combinators

Methods

slicedWith :: (a -> Text -> b) -> ReaderT e m a -> ReaderT e m b Source #

position :: ReaderT e m Position Source #

(SliceParsing m, MonadPlus m, Monoid w) => SliceParsing (RWST r w s m) Source # 
Instance details

Defined in Text.Parsix.Combinators

Methods

slicedWith :: (a -> Text -> b) -> RWST r w s m a -> RWST r w s m b Source #

position :: RWST r w s m Position Source #

(SliceParsing m, MonadPlus m, Monoid w) => SliceParsing (RWST r w s m) Source # 
Instance details

Defined in Text.Parsix.Combinators

Methods

slicedWith :: (a -> Text -> b) -> RWST r w s m a -> RWST r w s m b Source #

position :: RWST r w s m Position Source #

sliced :: SliceParsing m => m a -> m Text Source #

class Parsing m => RecoveryParsing m where Source #

Methods

withRecovery :: (ErrorInfo -> m a) -> m a -> m a Source #

Instances
RecoveryParsing Parser Source # 
Instance details

Defined in Text.Parsix.Combinators

Methods

withRecovery :: (ErrorInfo -> Parser a) -> Parser a -> Parser a Source #

(RecoveryParsing m, MonadPlus m) => RecoveryParsing (IdentityT m) Source # 
Instance details

Defined in Text.Parsix.Combinators

Methods

withRecovery :: (ErrorInfo -> IdentityT m a) -> IdentityT m a -> IdentityT m a Source #

(RecoveryParsing m, MonadPlus m) => RecoveryParsing (StateT s m) Source # 
Instance details

Defined in Text.Parsix.Combinators

Methods

withRecovery :: (ErrorInfo -> StateT s m a) -> StateT s m a -> StateT s m a Source #

(RecoveryParsing m, MonadPlus m) => RecoveryParsing (StateT s m) Source # 
Instance details

Defined in Text.Parsix.Combinators

Methods

withRecovery :: (ErrorInfo -> StateT s m a) -> StateT s m a -> StateT s m a Source #

(RecoveryParsing m, MonadPlus m, Monoid w) => RecoveryParsing (WriterT w m) Source # 
Instance details

Defined in Text.Parsix.Combinators

Methods

withRecovery :: (ErrorInfo -> WriterT w m a) -> WriterT w m a -> WriterT w m a Source #

(RecoveryParsing m, MonadPlus m, Monoid w) => RecoveryParsing (WriterT w m) Source # 
Instance details

Defined in Text.Parsix.Combinators

Methods

withRecovery :: (ErrorInfo -> WriterT w m a) -> WriterT w m a -> WriterT w m a Source #

(RecoveryParsing m, MonadPlus m) => RecoveryParsing (ReaderT e m) Source # 
Instance details

Defined in Text.Parsix.Combinators

Methods

withRecovery :: (ErrorInfo -> ReaderT e m a) -> ReaderT e m a -> ReaderT e m a Source #

(RecoveryParsing m, MonadPlus m, Monoid w) => RecoveryParsing (RWST r w s m) Source # 
Instance details

Defined in Text.Parsix.Combinators

Methods

withRecovery :: (ErrorInfo -> RWST r w s m a) -> RWST r w s m a -> RWST r w s m a Source #

(RecoveryParsing m, MonadPlus m, Monoid w) => RecoveryParsing (RWST r w s m) Source # 
Instance details

Defined in Text.Parsix.Combinators

Methods

withRecovery :: (ErrorInfo -> RWST r w s m a) -> RWST r w s m a -> RWST r w s m a Source #

careted :: (SliceParsing m, Applicative m) => m a -> m (Position, a) Source #

spanned :: (SliceParsing m, Applicative m) => m a -> m (Span, a) Source #

Low-level queries