idris-1.3.4: Functional Programming Language with Dependent Types

License | BSD3
Maintainer | The Idris Community.
Safe Haskell | None
Language | Haskell2010

Idris.Parser.Data

Description

Synopsis

- record :: SyntaxInfo -> IdrisParser PDecl
- recordParameter :: SyntaxInfo -> IdrisParser (Name, FC, Plicity, PTerm)
- dataI :: IdrisParser DataOpts
- recordI :: IdrisParser DataOpts
- dataOpts :: DataOpts -> IdrisParser DataOpts
- data_ :: SyntaxInfo -> IdrisParser PDecl
- constructor :: SyntaxInfo -> IdrisParser (Docstring (Either Err PTerm), [(Name, Docstring (Either Err PTerm))], Name, FC, PTerm, FC, [Name])
- simpleConstructor :: SyntaxInfo -> IdrisParser (Docstring (Either Err PTerm), [(Name, Docstring (Either Err PTerm))], Name, FC, [PTerm], FC, [Name])
- dsl :: SyntaxInfo -> IdrisParser PDecl
- checkDSL :: DSL -> IdrisParser ()
- overload :: SyntaxInfo -> IdrisParser (String, PTerm)

# Documentation

record :: SyntaxInfo -> IdrisParser PDecl #

Parses a record type declaration Record ::= DocComment Accessibility? `record` FnName TypeSig 'where' OpenBlock Constructor KeepTerminator CloseBlock;

recordParameter :: SyntaxInfo -> IdrisParser (Name, FC, Plicity, PTerm) #

dataI :: IdrisParser DataOpts #

Parses data declaration type (normal or codata) DataI ::= 'data' | `codata`;

recordI :: IdrisParser DataOpts #

dataOpts :: DataOpts -> IdrisParser DataOpts #

data_ :: SyntaxInfo -> IdrisParser PDecl #

Parses a data type declaration Data ::= DocComment? Accessibility? DataI FnName TypeSig ExplicitTypeDataRest? | DocComment? Accessibility? DataI FnName Name* DataRest? ; Constructor' ::= Constructor KeepTerminator; ExplicitTypeDataRest ::= 'where' OpenBlock Constructor'* CloseBlock;

DataRest ::= '=' SimpleConstructorList Terminator | 'where'! ; SimpleConstructorList ::= SimpleConstructor | SimpleConstructor '|' SimpleConstructorList ;

constructor :: SyntaxInfo -> IdrisParser (Docstring (Either Err PTerm), [(Name, Docstring (Either Err PTerm))], Name, FC, PTerm, FC, [Name]) #

Parses a type constructor declaration Constructor ::= DocComment? FnName TypeSig;

simpleConstructor :: SyntaxInfo -> IdrisParser (Docstring (Either Err PTerm), [(Name, Docstring (Either Err PTerm))], Name, FC, [PTerm], FC, [Name]) #

Parses a constructor for simple discriminated union data types SimpleConstructor ::= FnName SimpleExpr* DocComment?

dsl :: SyntaxInfo -> IdrisParser PDecl #

Parses a dsl block declaration DSL ::= `dsl` FnName OpenBlock Overload'+ CloseBlock;

checkDSL :: DSL -> IdrisParser () #

Checks DSL for errors

overload :: SyntaxInfo -> IdrisParser (String, PTerm) #

Parses a DSL overload declaration OverloadIdentifier ::= 'let' | Identifier; Overload ::= OverloadIdentifier '=' Expr;