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

Safe HaskellNone
LanguageHaskell98

Agda.Syntax.Concrete.Operators.Parser

Contents

Synopsis

Documentation

type Parser tok a = Parser MemoKey tok (MaybePlaceholder tok) a Source

sat' :: (e -> Bool) -> Parser e e Source

data ExprView e Source

Constructors

LocalV QName 
WildV e 
OtherV e 
AppV e (NamedArg e) 
OpAppV QName (Set Name) [NamedArg (MaybePlaceholder (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

data ParseSections Source

Should sections be parsed?

parse :: IsExpr e => (ParseSections, Parser e a) -> [e] -> [a] Source

Parser combinators

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

Parse a specific identifier as a NamePart

type family OperatorType k e :: * Source

Used to define the return type of opP.

data NK k :: * where Source

A singleton type for NotationKind (except for the constructor NoNotation).

opP :: forall e k. IsExpr e => ParseSections -> Parser e e -> NewNotation -> NK k -> Parser e (OperatorType k e) Source

Parse the "operator part" of the given notation.

Normal holes (but not binders) at the beginning and end are ignored.

If the notation does not contain any binders, then a section notation is allowed.

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

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

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