Fix parsing of else branches and lambdas

This commit is contained in:
Trevor Elliott 2015-06-10 18:49:40 -07:00
parent 915379af0e
commit 39eae330b1

View File

@ -355,8 +355,8 @@ ifBranch :: { (Expr, Expr) }
cexpr :: { Expr }
: sig_expr { $1 }
| 'if' ifBranches 'else' iexpr { at ($1,$4) $ mkIf $2 $4 }
| '\\' apats '->' iexpr { at ($1,$4) $ EFun (reverse $2) $4 }
| 'if' ifBranches 'else' cexpr { at ($1,$4) $ mkIf $2 $4 }
| '\\' apats '->' cexpr { at ($1,$4) $ EFun (reverse $2) $4 }
sig_expr :: { Expr }
: iexpr { $1 }