Safe Haskell | None |
---|---|
Language | Haskell2010 |
Synopsis
- type Parser = Parsec Void Text
- many :: Parser a -> Parser [a]
- many' :: Parser a -> Parser [a]
- some :: Parser a -> Parser (NonEmpty a)
- optional :: Parser a -> Parser (Maybe a)
- lexeme :: Parser a -> Parser a
- sepBy1 :: Parser a -> Parser sep -> Parser (NonEmpty a)
- string_ :: Text -> Parser Text
- char_ :: Char -> Parser Char
- between' :: Parser open -> Parser close -> Parser a -> Parser a
- comment :: Parser Comment
- lcIdent' :: Parser Ident
- ucIdent' :: Parser Ident
- lcNsIdent :: Parser Ident
- ucNsIdent :: Parser Ident
- lcFullIdent :: Parser FullIdent
- emptyKw :: Parser ()
- newKw :: Parser ()
- finalKw :: Parser ()
- nat :: Parser Int
Documentation
Helper functions
many :: Parser a -> Parser [a] Source #
many'
but removes whitespaces and comments before parsing each segment
sepBy1 :: Parser a -> Parser sep -> Parser (NonEmpty a) Source #
sepBy1
that backtracks and removes whitespaces etc.
Tokenizing
between' :: Parser open -> Parser close -> Parser a -> Parser a Source #
between
but removes whitespaces etc.
lcFullIdent :: Parser FullIdent Source #
Parses a lower case full identifier