Safe Haskell | None |
---|---|
Language | Haskell98 |
Constants, and utility functions to be used when parsing
- featureWasRemoved :: String -> TokenParser a
- properName :: TokenParser ProperName
- moduleName :: TokenParser ModuleName
- parseQualified :: TokenParser a -> TokenParser (Qualified a)
- parseIdent :: TokenParser Ident
- augment :: Stream s m t => ParsecT s u m a -> ParsecT s u m b -> (a -> b -> a) -> ParsecT s u m a
- fold :: Stream s m t => ParsecT s u m a -> ParsecT s u m b -> (a -> b -> a) -> ParsecT s u m a
- buildPostfixParser :: Stream s m t => [a -> ParsecT s u m a] -> ParsecT s u m a -> ParsecT s u m a
- mark :: Parsec s ParseState a -> Parsec s ParseState a
- checkIndentation :: (Column -> Column -> Bool) -> Parsec s ParseState ()
- indented :: Parsec s ParseState ()
- same :: Parsec s ParseState ()
- readComments :: Parsec [PositionedToken] u [Comment]
- runTokenParser :: FilePath -> TokenParser a -> [PositionedToken] -> Either ParseError a
Documentation
featureWasRemoved :: String -> TokenParser a Source
moduleName :: TokenParser ModuleName Source
Parse a module name
parseQualified :: TokenParser a -> TokenParser (Qualified a) Source
Parse a qualified name, i.e. M.name or just name
parseIdent :: TokenParser Ident Source
Parse an identifier or parenthesized operator
augment :: Stream s m t => ParsecT s u m a -> ParsecT s u m b -> (a -> b -> a) -> ParsecT s u m a Source
Run the first parser, then match the second if possible, applying the specified function on a successful match
fold :: Stream s m t => ParsecT s u m a -> ParsecT s u m b -> (a -> b -> a) -> ParsecT s u m a Source
Run the first parser, then match the second zero or more times, applying the specified function for each match
buildPostfixParser :: Stream s m t => [a -> ParsecT s u m a] -> ParsecT s u m a -> ParsecT s u m a Source
Build a parser from a smaller parser and a list of parsers for postfix operators
mark :: Parsec s ParseState a -> Parsec s ParseState a Source
Mark the current indentation level
checkIndentation :: (Column -> Column -> Bool) -> Parsec s ParseState () Source
Check that the current identation level matches a predicate
indented :: Parsec s ParseState () Source
Check that the current indentation level is past the current mark
same :: Parsec s ParseState () Source
Check that the current indentation level is at the same indentation as the current mark
readComments :: Parsec [PositionedToken] u [Comment] Source
Read the comments from the the next token, without consuming it
runTokenParser :: FilePath -> TokenParser a -> [PositionedToken] -> Either ParseError a Source
Run a parser