Safe Haskell | Safe-Inferred |
---|---|
Language | Haskell98 |
Constants, and utility functions to be used when parsing
- reservedPsNames :: [String]
- opChars :: [Char]
- reservedTypeNames :: [String]
- reservedOpNames :: [String]
- identStart :: Parsec String u Char
- identLetter :: Parsec String u Char
- opStart :: Parsec String u Char
- opLetter :: Parsec String u Char
- langDef :: GenLanguageDef String u Identity
- tokenParser :: GenTokenParser String u Identity
- lexeme :: Parsec String u a -> Parsec String u a
- identifier :: Parsec String u String
- identifierName :: Parsec String u String
- reserved :: String -> Parsec String u ()
- reservedOp :: String -> Parsec String u ()
- operator :: Parsec String u String
- stringLiteral :: Parsec String u String
- whiteSpace :: Parsec String u ()
- semi :: Parsec String u String
- colon :: Parsec String u String
- dot :: Parsec String u String
- comma :: Parsec String u String
- tick :: Parsec String u Char
- pipe :: Parsec String u Char
- natural :: Parsec String u Integer
- properName :: Parsec String u ProperName
- moduleName :: Parsec String ParseState ModuleName
- parseQualified :: Parsec String ParseState a -> Parsec String ParseState (Qualified a)
- integerOrFloat :: Parsec String u (Either Integer Double)
- parseIdent :: Parsec String ParseState Ident
- squares :: Parsec String ParseState a -> Parsec String ParseState a
- parens :: Parsec String ParseState a -> Parsec String ParseState a
- braces :: Parsec String ParseState a -> Parsec String ParseState a
- angles :: Parsec String ParseState a -> Parsec String ParseState a
- sepBy :: Parsec String ParseState a -> Parsec String ParseState sep -> Parsec String ParseState [a]
- sepBy1 :: Parsec String ParseState a -> Parsec String ParseState sep -> Parsec String ParseState [a]
- semiSep :: Parsec String ParseState a -> Parsec String ParseState [a]
- semiSep1 :: Parsec String ParseState a -> Parsec String ParseState [a]
- commaSep :: Parsec String ParseState a -> Parsec String ParseState [a]
- commaSep1 :: Parsec String ParseState a -> Parsec String ParseState [a]
- 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
- parseIdentInfix :: Parsec String ParseState (Qualified Ident)
- mark :: Parsec String ParseState a -> Parsec String ParseState a
- checkIndentation :: (Column -> Column -> Bool) -> Parsec String ParseState ()
- indented :: Parsec String ParseState ()
- same :: Parsec String ParseState ()
- runIndentParser :: FilePath -> Parsec String ParseState a -> String -> Either ParseError a
Documentation
reservedPsNames :: [String] Source
A list of purescript reserved identifiers
reservedTypeNames :: [String] Source
A list of reserved identifiers for types
reservedOpNames :: [String] Source
A list of reserved operators
identStart :: Parsec String u Char Source
Valid first characters for an identifier
identLetter :: Parsec String u Char Source
Valid identifier characters
langDef :: GenLanguageDef String u Identity Source
The PureScript language definition
tokenParser :: GenTokenParser String u Identity Source
A token parser based on the language definition
identifier :: Parsec String u String Source
Parse an identifier
identifierName :: Parsec String u String Source
Parse an identifier in a more permissive position
reservedOp :: String -> Parsec String u () Source
Parse a reserved operator
stringLiteral :: Parsec String u String Source
Parse a string literal
whiteSpace :: Parsec String u () Source
Parse whitespace
properName :: Parsec String u ProperName Source
Parse a proper name
moduleName :: Parsec String ParseState ModuleName Source
Parse a module name
parseQualified :: Parsec String ParseState a -> Parsec String ParseState (Qualified a) Source
Parse a qualified name, i.e. M.name or just name
integerOrFloat :: Parsec String u (Either Integer Double) Source
Parse an integer or floating point value
parseIdent :: Parsec String ParseState Ident Source
Parse an identifier or parenthesized operator
squares :: Parsec String ParseState a -> Parsec String ParseState a Source
Parse a token inside square brackets
parens :: Parsec String ParseState a -> Parsec String ParseState a Source
Parse a token inside parentheses
braces :: Parsec String ParseState a -> Parsec String ParseState a Source
Parse a token inside braces
angles :: Parsec String ParseState a -> Parsec String ParseState a Source
Parse a token inside angle brackets
sepBy :: Parsec String ParseState a -> Parsec String ParseState sep -> Parsec String ParseState [a] Source
Parse zero or more values separated by a separator token
sepBy1 :: Parsec String ParseState a -> Parsec String ParseState sep -> Parsec String ParseState [a] Source
Parse one or more values separated by a separator token
semiSep :: Parsec String ParseState a -> Parsec String ParseState [a] Source
Parse zero or more values separated by semicolons
semiSep1 :: Parsec String ParseState a -> Parsec String ParseState [a] Source
Parse one or more values separated by semicolons
commaSep :: Parsec String ParseState a -> Parsec String ParseState [a] Source
Parse zero or more values separated by commas
commaSep1 :: Parsec String ParseState a -> Parsec String ParseState [a] Source
Parse one or more values separated by commas
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
parseIdentInfix :: Parsec String ParseState (Qualified Ident) Source
Parse an identifier in backticks or an operator
mark :: Parsec String ParseState a -> Parsec String ParseState a Source
Mark the current indentation level
checkIndentation :: (Column -> Column -> Bool) -> Parsec String ParseState () Source
Check that the current identation level matches a predicate
indented :: Parsec String ParseState () Source
Check that the current indentation level is past the current mark
same :: Parsec String ParseState () Source
Check that the current indentation level is at the same indentation as the current mark
runIndentParser :: FilePath -> Parsec String ParseState a -> String -> Either ParseError a Source
Run a parser which supports indentation