Safe Haskell | None |
---|
- allowImp :: SyntaxInfo -> SyntaxInfo
- disallowImp :: SyntaxInfo -> SyntaxInfo
- fullExpr :: SyntaxInfo -> IdrisParser PTerm
- expr :: SyntaxInfo -> IdrisParser PTerm
- expr' :: SyntaxInfo -> IdrisParser PTerm
- externalExpr :: SyntaxInfo -> IdrisParser PTerm
- simpleExternalExpr :: SyntaxInfo -> IdrisParser PTerm
- extensions :: SyntaxInfo -> [Syntax] -> IdrisParser PTerm
- data SynMatch
- extension :: SyntaxInfo -> Syntax -> IdrisParser PTerm
- internalExpr :: SyntaxInfo -> IdrisParser PTerm
- caseExpr :: SyntaxInfo -> IdrisParser PTerm
- caseOption :: SyntaxInfo -> IdrisParser (PTerm, PTerm)
- proofExpr :: SyntaxInfo -> IdrisParser PTerm
- tacticsExpr :: SyntaxInfo -> IdrisParser PTerm
- simpleExpr :: SyntaxInfo -> IdrisParser PTerm
- bracketed :: SyntaxInfo -> IdrisParser PTerm
- modifyConst :: SyntaxInfo -> FC -> PTerm -> PTerm
- listExpr :: SyntaxInfo -> IdrisParser PTerm
- alt :: SyntaxInfo -> IdrisParser PTerm
- hsimpleExpr :: SyntaxInfo -> IdrisParser PTerm
- matchApp :: SyntaxInfo -> IdrisParser PTerm
- unifyLog :: SyntaxInfo -> IdrisParser PTerm
- noImplicits :: SyntaxInfo -> IdrisParser PTerm
- app :: SyntaxInfo -> IdrisParser PTerm
- arg :: SyntaxInfo -> IdrisParser PArg
- implicitArg :: SyntaxInfo -> IdrisParser PArg
- constraintArg :: SyntaxInfo -> IdrisParser PArg
- recordType :: SyntaxInfo -> IdrisParser PTerm
- mkType :: Name -> Name
- typeExpr :: SyntaxInfo -> IdrisParser PTerm
- lambda :: SyntaxInfo -> IdrisParser PTerm
- rewriteTerm :: SyntaxInfo -> IdrisParser PTerm
- let_ :: SyntaxInfo -> IdrisParser PTerm
- quoteGoal :: SyntaxInfo -> IdrisParser PTerm
- pi :: SyntaxInfo -> IdrisParser PTerm
- constraintList :: SyntaxInfo -> IdrisParser [PTerm]
- typeDeclList :: SyntaxInfo -> IdrisParser [(Name, PTerm)]
- tyOptDeclList :: SyntaxInfo -> IdrisParser [(Name, PTerm)]
- comprehension :: SyntaxInfo -> IdrisParser PTerm
- doBlock :: SyntaxInfo -> IdrisParser PTerm
- do_ :: SyntaxInfo -> IdrisParser PDo
- idiom :: SyntaxInfo -> IdrisParser PTerm
- constant :: IdrisParser Const
- static :: IdrisParser Static
- tactic :: SyntaxInfo -> IdrisParser PTactic
- fullTactic :: SyntaxInfo -> IdrisParser PTactic
Documentation
allowImp :: SyntaxInfo -> SyntaxInfoSource
Allow implicit type declarations
disallowImp :: SyntaxInfo -> SyntaxInfoSource
Disallow implicit type declarations
fullExpr :: SyntaxInfo -> IdrisParser PTermSource
Parses an expression as a whole
FullExpr ::= Expr EOF_t;
expr :: SyntaxInfo -> IdrisParser PTermSource
Parses an expression
Expr ::= Expr';
expr' :: SyntaxInfo -> IdrisParser PTermSource
Parses either an internally defined expression or a user-defined one
Expr' ::= External (User-defined) Syntax | InternalExpr;
externalExpr :: SyntaxInfo -> IdrisParser PTermSource
Parses a user-defined expression
simpleExternalExpr :: SyntaxInfo -> IdrisParser PTermSource
Parses a simple user-defined expression
extensions :: SyntaxInfo -> [Syntax] -> IdrisParser PTermSource
Tries to parse a user-defined expression given a list of syntactic extensions
extension :: SyntaxInfo -> Syntax -> IdrisParser PTermSource
Tries to parse an expression given a user-defined rule
internalExpr :: SyntaxInfo -> IdrisParser PTermSource
Parses a (normal) built-in expression
InternalExpr ::= App | MatchApp | UnifyLog | RecordType | SimpleExpr | Lambda | QuoteGoal | Let | RewriteTerm | Pi | DoBlock ;
caseExpr :: SyntaxInfo -> IdrisParser PTermSource
Parses a case expression
CaseExpr ::= 'case' Expr 'of' OpenBlock CaseOption+ CloseBlock;
caseOption :: SyntaxInfo -> IdrisParser (PTerm, PTerm)Source
Parses a case in a case expression
CaseOption ::= Expr '=>' Expr Terminator ;
proofExpr :: SyntaxInfo -> IdrisParser PTermSource
Parses a proof block
ProofExpr ::=
proof
OpenBlock Tactic'* CloseBlock
;
tacticsExpr :: SyntaxInfo -> IdrisParser PTermSource
Parses a tactics block
TacticsExpr :=
tactics
OpenBlock Tactic'* CloseBlock
;
simpleExpr :: SyntaxInfo -> IdrisParser PTermSource
Parses a simple expression
SimpleExpr ::= '![' Term ']' |?
Name | % 'instance' |refl
('{' Expr '}')? | ProofExpr | TacticsExpr | CaseExpr | FnName | List | Comprehension | Alt | Idiom | '(' Bracketed | Constant | Type | '_|_' | '_' | ;
modifyConst :: SyntaxInfo -> FC -> PTerm -> PTermSource
Finds optimal type for integer constant
listExpr :: SyntaxInfo -> IdrisParser PTermSource
Parses a list literal expression e.g. [1,2,3]
ListExpr ::= '[' ExprList? ']' ;
ExprList ::= Expr | Expr ',' ExprList ;
alt :: SyntaxInfo -> IdrisParser PTermSource
Parses an alternative expression
Alt ::= '(|' Expr_List '|)'; Expr_List ::= Expr' | Expr' ',' Expr_List ;
hsimpleExpr :: SyntaxInfo -> IdrisParser PTermSource
Parses a possibly hidden simple expression
HSimpleExpr ::=
.
SimpleExpr
| SimpleExpr
;
matchApp :: SyntaxInfo -> IdrisParser PTermSource
Parses a matching application expression
MatchApp ::=
SimpleExpr <==
FnName
;
unifyLog :: SyntaxInfo -> IdrisParser PTermSource
Parses a unification log expression
UnifyLog ::=%
unifyLog
SimpleExpr ;
noImplicits :: SyntaxInfo -> IdrisParser PTermSource
Parses a no implicits expression
NoImplicits ::=%
noImplicits
SimpleExpr ;
app :: SyntaxInfo -> IdrisParser PTermSource
Parses a function application expression
App ::=
mkForeign
Arg Arg*
| SimpleExpr Arg+
;
arg :: SyntaxInfo -> IdrisParser PArgSource
Parses a function argument
Arg ::= ImplicitArg | ConstraintArg | SimpleExpr ;
implicitArg :: SyntaxInfo -> IdrisParser PArgSource
Parses an implicit function argument
ImplicitArg ::= '{' Name ('=' Expr)? '}' ;
constraintArg :: SyntaxInfo -> IdrisParser PArgSource
Parses a constraint argument (for selecting a named type class instance)
ConstraintArg ::= '@{' Expr '}' ;
recordType :: SyntaxInfo -> IdrisParser PTermSource
Parses a record field setter expression
RecordType ::=
record
'{' FieldTypeList '}';
FieldTypeList ::= FieldType | FieldType ',' FieldTypeList ;
FieldType ::= FnName '=' Expr ;
typeExpr :: SyntaxInfo -> IdrisParser PTermSource
Parses a type signature
TypeSig ::=
:
Expr
;
TypeExpr ::= ConstraintList? Expr;
rewriteTerm :: SyntaxInfo -> IdrisParser PTermSource
Parses a term rewrite expression
RewriteTerm ::=rewrite
Expr (==>
Expr)? 'in' Expr ;
let_ :: SyntaxInfo -> IdrisParser PTermSource
Parses a let binding
Let ::=
'let' Name TypeSig'? '=' Expr 'in' Expr
| 'let' Expr' '=' Expr' 'in' Expr
TypeSig' ::=
:
Expr'
;
quoteGoal :: SyntaxInfo -> IdrisParser PTermSource
Parses a quote goal
QuoteGoal ::=quoteGoal
Nameby
Expr 'in' Expr ;
pi :: SyntaxInfo -> IdrisParser PTermSource
Parses a dependent type signature
Pi ::=
'|'? Static? '(' TypeDeclList ')' DocComment '->' Expr
| '|'? Static? '{' TypeDeclList '}' '->' Expr
| '{' auto
TypeDeclList '}' '->' Expr
| '{' 'default' TypeDeclList '}' '->' Expr
;
constraintList :: SyntaxInfo -> IdrisParser [PTerm]Source
Parses a type constraint list
ConstraintList ::= '(' Expr_List ')' '=>' | Expr '=>' ;
typeDeclList :: SyntaxInfo -> IdrisParser [(Name, PTerm)]Source
Parses a type declaration list
TypeDeclList ::= FunctionSignatureList | NameList TypeSig ;
FunctionSignatureList ::= Name TypeSig | Name TypeSig ',' FunctionSignatureList ;
tyOptDeclList :: SyntaxInfo -> IdrisParser [(Name, PTerm)]Source
Parses a type declaration list with optional parameters
TypeOptDeclList ::= NameOrPlaceholder TypeSig? | NameOrPlaceholder TypeSig? ',' TypeOptDeclList ;
NameOrPlaceHolder ::= Name | '_';
comprehension :: SyntaxInfo -> IdrisParser PTermSource
Parses a list comprehension
Comprehension ::= '[' Expr '|' DoList ']';
DoList ::= Do | Do ',' DoList ;
doBlock :: SyntaxInfo -> IdrisParser PTermSource
Parses a do-block
Do' ::= Do KeepTerminator;
DoBlock ::= 'do' OpenBlock Do'+ CloseBlock ;
do_ :: SyntaxInfo -> IdrisParser PDoSource
Parses an expression inside a do block
Do ::= 'let' Name TypeSig'? '=' Expr | 'let' Expr' '=' Expr | Name '<-' Expr | Expr' '<-' Expr | Expr ;
idiom :: SyntaxInfo -> IdrisParser PTermSource
Parses an expression in idiom brackets
Idiom ::= '[|' Expr '|]';
static :: IdrisParser StaticSource
Parses a static modifier
Static ::= '[' static ']' ;
tactic :: SyntaxInfo -> IdrisParser PTacticSource
Parses a tactic script
Tactic ::=intro
NameList? |intros
|refine
Name Imp+ |mrefine
Name |rewrite
Expr |equiv
Expr | 'let' Name:
Expr' '=' Expr | 'let' Name '=' Expr |focus
Name |exact
Expr |applyTactic
Expr |reflect
Expr |fill
Expr |try
Tactic '|' Tactic | '{' TacticSeq '}' |compute
|trivial
|solve
|attack
|state
|term
|undo
|qed
|abandon
|:
q
; Imp ::=?
| '_'; TacticSeq ::= Tactic ';' Tactic | Tactic ';' TacticSeq ;
fullTactic :: SyntaxInfo -> IdrisParser PTacticSource
Parses a tactic as a whole