| Agda-2.2.6: A dependently typed functional programming language and proof assistant | Source code | Contents | Index

Agda.Syntax.Parser

Contents

Types
Parse functions
Parsers
Parse errors

Synopsis

data Parser a
parse :: Strict a => Parser a -> String -> IO a
parseLiterate :: Strict a => Parser a -> String -> IO a
parsePosString :: Strict a => Parser a -> Position -> String -> IO a
parseFile' :: Strict a => Parser a -> AbsolutePath -> IO a
moduleParser :: Parser Module
exprParser :: Parser Expr
tokensParser :: Parser [Token]

data ParseError = ParseError {

errPos :: Position
errInput :: String
errPrevToken :: String
errMsg :: String

}

Types

data Parser a | Source

Wrapped Parser type.

Parse functions

parse :: Strict a => Parser a -> String -> IO a | Source

parseLiterate :: Strict a => Parser a -> String -> IO a | Source

parsePosString :: Strict a => Parser a -> Position -> String -> IO a | Source

parseFile' :: Strict a => Parser a -> AbsolutePath -> IO a | Source

Parsers

moduleParser :: Parser Module | Source

Parses a module.

exprParser :: Parser Expr | Source

Parses an expression.

tokensParser :: Parser [Token] | Source

Gives the parsed token stream (including comments).
Parse errors

data ParseError | Source

What you get if parsing fails.
Constructors

ParseError |

errPos :: Position | where the error occured
errInput :: String | the remaining input
errPrevToken :: String | the previous token
errMsg :: String | hopefully an explanation of what happened

Instances

Show ParseError
Typeable ParseError
Exception ParseError
HasRange ParseError
MonadError ParseError Parser

Produced by Haddock version 2.4.2