idris-1.1.1: Functional Programming Language with Dependent Types

CopyrightLicense : BSD3
MaintainerThe Idris Community.
Safe HaskellNone
LanguageHaskell2010

Idris.Parser.Ops

Description

 

Synopsis

Documentation

table :: [FixDecl] -> OperatorTable IdrisParser PTerm Source #

Creates table for fixity declarations to build expression parser using pre-build and user-defined operator/fixity declarations

toTable :: [FixDecl] -> OperatorTable IdrisParser PTerm Source #

Calculates table for fixity declarations

binary :: String -> (FC -> PTerm -> PTerm -> PTerm) -> Assoc -> Operator IdrisParser PTerm Source #

Binary operator

prefix :: String -> (FC -> PTerm -> PTerm) -> Operator IdrisParser PTerm Source #

Prefix operator

nofixityoperator :: Operator IdrisParser PTerm Source #

Operator without fixity (throws an error)

operatorFront :: IdrisParser (Name, FC) Source #

Parses an operator in function position i.e. enclosed by `()', with an optional namespace

  OperatorFront ::=
    '(' '=' ')'
    | (Identifier_t .)? '(' Operator_t ')'
    ;

fnName :: IdrisParser (Name, FC) Source #

Parses a function (either normal name or operator)

  FnName ::= Name | OperatorFront;

fixity :: IdrisParser PDecl Source #

Parses a fixity declaration Fixity ::= FixityType Natural_t OperatorList Terminator ;

checkDeclFixity :: IdrisParser PDecl -> IdrisParser PDecl Source #

Check that a declaration of an operator also has fixity declared

checkNameFixity :: Name -> IdrisParser () Source #

Checks that an operator name also has a fixity declaration

fixityType :: IdrisParser (Int -> Fixity) Source #

Parses a fixity declaration type (i.e. infix or prefix, associtavity) FixityType ::= 'infixl' | 'infixr' | 'infix' | prefix ;