symantic-parser-0.2.1.20210803: Parser combinators statically optimized and staged via typed meta-programming
Safe HaskellNone
LanguageHaskell2010

Parsers.Utils.Attoparsec

Synopsis

Class Inputable

class Chunk inp => Inputable inp where Source #

Associated Types

type Token inp Source #

Methods

null :: inp -> Bool Source #

empty :: inp Source #

uncons :: inp -> Maybe (Token inp, inp) Source #

satisfy :: (Token inp -> Bool) -> Parser inp (Token inp) Source #

char :: Char -> Parser inp Char Source #

notInClass :: String -> Token inp -> Bool Source #

between :: Applicative f => f a -> f b -> f c -> f c Source #

match :: (Monad m, Eq a) => [a] -> m a -> (a -> m b) -> m b -> m b Source #

skipSome :: Alternative p => p a -> p () Source #

some :: Alternative p => p a -> p [a] Source #

maybeP :: Alternative p => p a -> p (Maybe a) Source #

fromMaybeP :: Monad m => m (Maybe a) -> m a -> m a Source #

(<+>) :: Alternative p => p a -> p b -> p (Either a b) Source #

(<:>) :: Applicative p => p a -> p [a] -> p [a] Source #

(<~>) :: Applicative p => p a -> p b -> p (a, b) Source #

pfoldl1 :: Alternative p => (b -> a -> b) -> b -> p a -> p b Source #

(>?>) :: MonadPlus m => m a -> (a -> Bool) -> m a Source #

chainPre :: Alternative p => p (a -> a) -> p a -> p a Source #

chainPost :: Alternative p => p a -> p (a -> a) -> p a Source #

chainl1 :: Alternative p => p a -> p (a -> a -> a) -> p a Source #

chainr1 :: Alternative p => p a -> p (a -> a -> a) -> p a Source #

data Level p s a Source #

Constructors

InfixL [p (a -> a -> a)] 
InfixR [p (a -> a -> a)] 
Prefix [p (a -> a)] 
Postfix [p (a -> a)] 

precedence :: Alternative p => [Level p s a] -> p a -> p a Source #