5
Module. Program ::= [Decl] ;
9
ELam. Exp ::= "\\" Ident "->" Exp ;
10
EFun. Exp ::= "(" Ident ":" Exp ")" "->" Exp ;
11
Efun. Exp ::= "[" [Branch] "]" ;
13
EApp. Exp1 ::= Ident [Exp2] ; -- with arguments
15
ESet. Exp2 ::= "Set" ;
16
EIdent. Exp2 ::= Ident ; -- without arguments
18
separator nonempty Exp2 "" ;
22
Bcon. Branch ::= Ident "->" Exp ;
23
separator Branch "|" ;
25
Var. Decl ::= Ident ":" Exp ;
28
Def. Decl ::= "def" Ident ":" Exp "=" Exp ;
32
DefRec. Decl ::= "fun" Ident ":" Exp "=" Exp ;
37
Data. Decl ::= "data" Ident "(" [VDecl] ")" "where" "[" [ConstrDecl] "]" ;
38
CDcon. ConstrDecl::= Ident ":" Exp ;
39
separator ConstrDecl "|" ;
40
Vcon. VDecl::= Ident ":" Exp ;