| Safe Haskell | Safe |
|---|---|
| Language | Haskell2010 |
Funcs
Description
Synopsis
- regularParse :: Parser a -> String -> Either ParseError a
- parseWithEof :: Parser a -> String -> Either ParseError a
- parseWithLeftOver :: Parser a -> String -> Either ParseError (a, String)
- parseWithWSEof :: Parser a -> String -> Either ParseError a
- lexeme :: Parser a -> Parser a
- integer :: Parser Integer
- identifier :: Parser String
- symbol :: String -> Parser String
- comma :: Parser Char
- openParen :: Parser Char
- closeParen :: Parser Char
- keyword :: String -> Parser String
- parens :: Parser a -> Parser a
- identifierBlacklist :: [String] -> Parser String
- whitespace :: Parser ()
- keyword_ :: String -> Parser ()
- symbol_ :: String -> Parser ()
- commaSep1 :: Parser a -> Parser [a]
- stringToken :: Parser String
- boolToken :: Parser Bool
Documentation
regularParse :: Parser a -> String -> Either ParseError a Source #
The regularParse parses a expression regularlly
parseWithEof :: Parser a -> String -> Either ParseError a Source #
The parseWithEof is a wrapper that throws error if you haven’t consumed all the input
parseWithLeftOver :: Parser a -> String -> Either ParseError (a, String) Source #
The parseWithLeftOver is wrapper that tell you what was not consumed from the input by input parser
parseWithWSEof :: Parser a -> String -> Either ParseError a Source #
The parseWithWSEof wrapper allows parsing when input constains and leading whitespaces
lexeme :: Parser a -> Parser a Source #
The lexeme is wrapper parser that eats up any following whitespaces after parsing.
identifier :: Parser String Source #
The identifier parses a identifier string
symbol :: String -> Parser String Source #
The symbol parses a single character symbol or operator
It takes string as arguments and comapres it with parsed string.
closeParen :: Parser Char Source #
The closeParen parses closing paranthesis
keyword :: String -> Parser String Source #
The keyowrd parses a occurence of string given as input
It takes a string to pe parsed as only input
parens :: Parser a -> Parser a Source #
The parens function parses anything between opening and closing paranthesis
identifierBlacklist :: [String] -> Parser String Source #
The identifierBlacklist parses only that identifiers that are not in blacklist
It takes a blacklist of type List as an argument
whitespace :: Parser () Source #
The whitespace parses any number of any type of whiespaces
commaSep1 :: Parser a -> Parser [a] Source #
The commaSep1 parses comma seperated items and returns a list
stringToken :: Parser String Source #
The stringToken parses a string literal in single quotes