@@ -316,14 +316,14 @@ if(!tryEat(":")) { eat("then", "after if condition"); tryEat(":"); } - AST th = E(0); + AST th = Body(); auto el = doNothingExpression(); auto elsePos = currentPosition(); if( tryEat("else") ) { tryEat(":"); - el = E(0); + el = Body(); } return new App(pos, new Var(pos,"if"), cond, new Fun(thenPos,[],th), new Fun(elsePos,[],el)); } @@ -352,9 +352,9 @@ string failBranchVar = freshVarName(); auto pr = parsePattern(); eat(":", "after when pattern"); - AST cBody = E(0); + AST cBody = Body(); AST judgement = new App(pos, new Var(pos, "if"), ppTest(pmVar, pr), new Fun(pos,[],ppBind(pmVar, pr, cBody)), new Var(pos, failBranchVar)); return parsePatternMatchCases(casePos, pmVar, failBranchVar,