Safe Haskell | Safe-Inferred |
---|---|
Language | Haskell2010 |
Ast.Parser.Program
Synopsis
- parseProgram :: String -> Parser Program
- parseTypeDefinition :: Parser Program
- parseExpr :: Parser Program
- globalExpr :: Expr -> (String, Expr)
- globalType :: Type -> (String, Type)
Documentation
parseProgram :: String -> Parser Program Source #
Parses a program by first preprocessing the source file and then parsing its components.
Components can be type definitions or expressions.
Returns an Program
containing the parsed global expressions, types, and the source file name.
parseTypeDefinition :: Parser Program Source #
Parses a type definition and wraps it in an Program
structure.
Returns a program with the parsed type definition as a global type.
parseExpr :: Parser Program Source #
Parses an expression and wraps it in an Program
structure.
Returns a program with the parsed expression as a global expression.