Safe Haskell | None |
---|---|
Language | Haskell2010 |
Synopsis
- type Parser = Parsec Void Text
- parse :: MonadError Error m => FilePath -> Text -> m Expr'
- resolveImports :: (MonadError Error m, MonadIO m) => FilePath -> Expr' -> m Expr
- sc :: Parser ()
- symbol :: Text -> Parser Text
- lexeme :: Parser a -> Parser a
- braces :: Parser a -> Parser a
- brackets :: Parser a -> Parser a
- parens :: Parser a -> Parser a
- comma :: Parser Text
- colon :: Parser Text
- annotateLoc :: Parser (f a) -> Parser (AnnF f SrcSpan a)
- identifier :: Parser String
- keywordP :: Text -> Parser Text
- stringLiteral :: Parser String
- escapeAscii :: Parser Char
- escapeUnicode :: Parser Char
- verbatimString :: Parser String
- textBlock :: Parser String
- unquoted :: Parser Expr'
- stringP :: Parser Expr'
- numberP :: Parser Expr'
- identP :: Parser Expr'
- booleanP :: Parser Expr'
- nullP :: Parser Expr'
- errorP :: Parser Expr'
- assertP :: Parser Expr'
- ifElseP :: Parser Expr'
- paramsP :: Parser [Param Expr']
- function :: Parser [Param Expr'] -> Parser Expr' -> Parser Expr'
- functionP :: Parser Expr'
- forspecP :: Parser (CompSpec Expr')
- binding :: Parser (String, Expr')
- localFunc :: Parser (String, Expr')
- localBndsP :: Parser (NonEmpty (String, Expr'))
- localP :: Parser Expr'
- arrayP :: Parser Expr'
- objectP :: Parser Expr'
- importP :: Parser Expr'
- binary :: Text -> (Expr' -> Expr' -> Expr') -> Operator Parser Expr'
- prefix :: Text -> (Expr' -> Expr') -> Operator Parser Expr'
- opTable :: [[Operator Parser Expr']]
- postfixObjectMerge :: Parser (Expr' -> Expr')
- postfixOperators :: Parser (Expr' -> Expr')
- indexP :: Parser (Expr' -> Expr')
- lookupP :: Parser (Expr' -> Expr')
- applyP :: Parser (Expr' -> Expr')
- sliceP :: Parser (Expr' -> Expr')
- primP :: Parser Expr'
- exprP :: Parser Expr'
- reservedKeywords :: [String]
Documentation
resolveImports :: (MonadError Error m, MonadIO m) => FilePath -> Expr' -> m Expr Source #
escapeAscii :: Parser Char Source #
opTable :: [[Operator Parser Expr']] Source #
associativity and operator precedence
1. e(...)
e[...]
e.f
(application and indexing)
2. +
-
!
~
(the unary operators)
3. *
/
%
(these, and the remainder below, are binary operators)
4. +
-
5. <<
>>
6. <
>
<=
>=
in
7. ==
!=
8. &
9. ^
10. |
11. &&
12. ||
default is associate to the left
postfixObjectMerge :: Parser (Expr' -> Expr') Source #
shorthand syntax for object composition:
when the right-hand side is an object literal the +
operator can be elided.
postfixOperators :: Parser (Expr' -> Expr') Source #
application, indexing and lookup: e(...) e[...] e.f all have the same precedence (the highest)
reservedKeywords :: [String] Source #