Safe Haskell | None |
---|---|
Language | Haskell2010 |
- ops :: [String]
- types :: [String]
- names :: [String]
- type ParserStream = IndentStream (CharIndentStream Text)
- type Parser = ParsecT ParserStream () Identity
- type Operator a = Operator ParserStream () Identity a
- type OperatorTable a = [[Operator a]]
- style :: GenLanguageDef ParserStream st Identity
- comments :: Parser ()
- emptyLine :: Parser ()
- lexer :: GenTokenParser ParserStream () Identity
- whiteSpace :: Parser ()
- decimal :: Parser Integer
- integer :: Parser Integer
- float :: Parser Rational
- fractFloat :: Integer -> Parser (Either Integer Rational)
- fractExponent :: Integer -> Parser Rational
- fraction :: Parser Rational
- exponent' :: Parser Rational
- parens :: Parser a -> Parser a
- braces :: Parser a -> Parser a
- brackets :: Parser a -> Parser a
- commaSep :: Parser a -> Parser [a]
- semiSep :: Parser a -> Parser [a]
- semiSep1 :: Parser a -> Parser [a]
- identifier :: Parser Text
- reserved :: String -> Parser ()
- reservedOp :: String -> Parser ()
- symbol :: Text -> Parser Text
- app1 :: Text -> AST' Text -> AST' Text
- app2 :: Text -> AST' Text -> AST' Text -> AST' Text
- divide :: AST' Text -> AST' Text -> AST' Text
- binop :: Text -> AST' Text -> AST' Text -> AST' Text
- binary :: String -> Assoc -> Operator (AST' Text)
- prefix :: String -> (a -> a) -> Operator a
- postfix :: Parser (a -> a) -> Operator a
- table :: OperatorTable (AST' Text)
- unit_ :: Parser (AST' a)
- empty_ :: Parser (AST' a)
- int :: Parser (AST' a)
- floating :: Parser (AST' a)
- inf_ :: Parser (AST' Text)
- var :: Parser (AST' Text)
- pairs :: Parser (AST' Text)
- type_var :: Parser TypeAST'
- type_app :: Parser TypeAST'
- type_fun :: Parser TypeAST'
- type_expr :: Parser TypeAST'
- ann_expr :: Parser (AST' Text -> AST' Text)
- pdat_expr :: Parser (PDatum Text)
- pat_expr :: Parser (Pattern' Text)
- blockOfMany :: Parser a -> Parser [a]
- semiblockExpr :: Parser (AST' Text)
- pseudoblockExpr :: Parser (AST' Text)
- branch_expr :: Parser (Branch' Text)
- match_expr :: Parser (AST' Text)
- integrate_expr :: Parser (AST' Text)
- summate_expr :: Parser (AST' Text)
- product_expr :: Parser (AST' Text)
- expect_expr :: Parser (AST' Text)
- observe_expr :: Parser (AST' Text)
- array_expr :: Parser (AST' Text)
- array_index :: Parser (AST' Text -> AST' Text)
- array_literal :: Parser (AST' Text)
- plate_expr :: Parser (AST' Text)
- chain_expr :: Parser (AST' Text)
- if_expr :: Parser (AST' Text)
- lam_expr :: Parser (AST' Text)
- bind_expr :: Parser (AST' Text)
- let_expr :: Parser (AST' Text)
- def_expr :: Parser (AST' Text)
- defarg :: Parser (Text, TypeAST')
- call_expr :: Parser (AST' Text)
- return_expr :: Parser (AST' Text)
- term :: Parser (AST' Text)
- expr :: Parser (AST' Text)
- indentConfig :: Text -> ParserStream
- parseHakaru :: Text -> Either ParseError (AST' Text)
- parseHakaruWithImports :: Text -> Either ParseError (ASTWithImport' Text)
- withPos :: Parser (AST' a) -> Parser (AST' a)
- data_expr :: Parser (AST' Text)
- import_expr :: Parser (Import Text)
- exprWithImport :: Parser (ASTWithImport' Text)
Documentation
type ParserStream = IndentStream (CharIndentStream Text) Source #
type OperatorTable a = [[Operator a]] Source #
whiteSpace :: Parser () Source #
identifier :: Parser Text Source #
reservedOp :: String -> Parser () Source #
blockOfMany :: Parser a -> Parser [a] Source #
Blocks are indicated by colons, and must be indented.
semiblockExpr :: Parser (AST' Text) Source #
Semiblocks are like blocks, but indentation is optional. Also,
there are only expr
semiblocks.
pseudoblockExpr :: Parser (AST' Text) Source #
Pseudoblocks seem like semiblocks, but actually they aren't indented.
TODO: do we actually want this in our grammar, or did we really
mean to use semiblockExpr
instead?
indentConfig :: Text -> ParserStream Source #
parseHakaru :: Text -> Either ParseError (AST' Text) Source #