Safe Haskell | Safe |
---|---|
Language | Haskell2010 |
Synopsis
- satisfyTok :: Monad m => (Tok -> Bool) -> ParsecT [Tok] s m Tok
- satisfyWord :: Monad m => (Text -> Bool) -> ParsecT [Tok] s m Tok
- anyTok :: Monad m => ParsecT [Tok] s m Tok
- anySymbol :: Monad m => ParsecT [Tok] s m Tok
- symbol :: Monad m => Char -> ParsecT [Tok] s m Tok
- whitespace :: Monad m => ParsecT [Tok] s m [Tok]
- lineEnd :: Monad m => ParsecT [Tok] s m Tok
- spaceTok :: Monad m => ParsecT [Tok] s m Tok
- oneOfToks :: Monad m => [TokType] -> ParsecT [Tok] s m Tok
- noneOfToks :: Monad m => [TokType] -> ParsecT [Tok] s m Tok
- gobbleSpaces :: Monad m => Int -> ParsecT [Tok] u m Int
- gobbleUpToSpaces :: Monad m => Int -> ParsecT [Tok] u m Int
- withRaw :: Monad m => ParsecT [Tok] s m a -> ParsecT [Tok] s m (a, [Tok])
- hasType :: TokType -> Tok -> Bool
- textIs :: (Text -> Bool) -> Tok -> Bool
- blankLine :: Monad m => ParsecT [Tok] s m ()
- restOfLine :: Monad m => ParsecT [Tok] s m [Tok]
- isOneOfCI :: [Text] -> Text -> Bool
- nonindentSpaces :: Monad m => ParsecT [Tok] u m ()
- skipManyTill :: ParsecT s u m a -> ParsecT s u m b -> ParsecT s u m ()
- skipWhile :: Monad m => (Tok -> Bool) -> ParsecT [Tok] u m ()
Documentation
satisfyTok :: Monad m => (Tok -> Bool) -> ParsecT [Tok] s m Tok Source #
Parses a single Tok
satisfying a predicate.
satisfyWord :: Monad m => (Text -> Bool) -> ParsecT [Tok] s m Tok Source #
Parses a WordChars
token matching a predicate.
oneOfToks :: Monad m => [TokType] -> ParsecT [Tok] s m Tok Source #
Parses a Tok
with one of the listed types.
noneOfToks :: Monad m => [TokType] -> ParsecT [Tok] s m Tok Source #
Parses a Tok
with none of the listed types.
gobbleSpaces :: Monad m => Int -> ParsecT [Tok] u m Int Source #
Parses exactly n
spaces. If tabs are encountered,
they are split into spaces before being consumed; so
a tab may be partially consumed by this parser.
withRaw :: Monad m => ParsecT [Tok] s m a -> ParsecT [Tok] s m (a, [Tok]) Source #
Applies a parser and returns its value (if successful) plus a list of the raw tokens parsed.
restOfLine :: Monad m => ParsecT [Tok] s m [Tok] Source #
Efficiently parse the remaining tokens on a line, including the LineEnd (if any).
nonindentSpaces :: Monad m => ParsecT [Tok] u m () Source #
Gobble up to 3 spaces (may be part of a tab).