Agda-2.4.2.3: A dependently typed functional programming language and proof assistant

Safe HaskellNone
LanguageHaskell98

Agda.Syntax.Concrete.Operators.Parser

Contents

Synopsis

Documentation

data ExprView e Source

Constructors

LocalV QName 
WildV e 
OtherV e 
AppV e (NamedArg e) 
OpAppV QName (Set Name) [NamedArg (OpApp e)]

The QName is possibly ambiguous, but it must correspond to one of the names in the set.

HiddenArgV (Named_ e) 
InstanceArgV (Named_ e) 
LamV [LamBinding] e 
ParenV e 

Instances

class HasRange e => IsExpr e where Source

Methods

exprView :: e -> ExprView e Source

unExprView :: ExprView e -> e Source

Parser combinators

partP :: IsExpr e => [Name] -> RawName -> ReadP e Range Source

Parse a specific identifier as a NamePart

binop :: IsExpr e => ReadP e (NewNotation, Range, [e]) -> ReadP e (e -> e -> e) Source

preop :: IsExpr e => ReadP e (NewNotation, Range, [e]) -> ReadP e (e -> e) Source

postop :: IsExpr e => ReadP e (NewNotation, Range, [e]) -> ReadP e (e -> e) Source

opP :: IsExpr e => ReadP e e -> NewNotation -> ReadP e (NewNotation, Range, [e]) Source

Parse the "operator part" of the given syntax. holes at beginning and end are IGNORED.

rebuild :: forall e. IsExpr e => NewNotation -> Range -> [e] -> e Source

Given a name with a syntax spec, and a list of parsed expressions fitting it, rebuild the expression.

infixP :: IsExpr e => ReadP e (NewNotation, Range, [e]) -> ReadP e e -> ReadP e e Source

Parse using the appropriate fixity, given a parser parsing the operator part, the name of the operator, and a parser of subexpressions.

infixrP :: IsExpr e => ReadP e (NewNotation, Range, [e]) -> ReadP e e -> ReadP e e Source

Parse using the appropriate fixity, given a parser parsing the operator part, the name of the operator, and a parser of subexpressions.

infixlP :: IsExpr e => ReadP e (NewNotation, Range, [e]) -> ReadP e e -> ReadP e e Source

Parse using the appropriate fixity, given a parser parsing the operator part, the name of the operator, and a parser of subexpressions.

postfixP :: IsExpr e => ReadP e (NewNotation, Range, [e]) -> ReadP e e -> ReadP e e Source

Parse using the appropriate fixity, given a parser parsing the operator part, the name of the operator, and a parser of subexpressions.

prefixP :: IsExpr e => ReadP e (NewNotation, Range, [e]) -> ReadP e e -> ReadP e e Source

Parse using the appropriate fixity, given a parser parsing the operator part, the name of the operator, and a parser of subexpressions.

nonfixP :: IsExpr e => ReadP e (NewNotation, Range, [e]) -> ReadP e e -> ReadP e e Source

Parse using the appropriate fixity, given a parser parsing the operator part, the name of the operator, and a parser of subexpressions.

argsP :: IsExpr e => ReadP e e -> ReadP e [NamedArg e] Source

appP :: IsExpr e => ReadP e e -> ReadP e [NamedArg e] -> ReadP e e Source

atomP :: IsExpr e => (QName -> Bool) -> ReadP e e Source