Reverse alternatives in multi-way if.

Fixes #245
This commit is contained in:
Iavor S. Diatchki 2015-06-22 09:20:08 -07:00
parent efc4443707
commit 6ddec6d128

View File

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