[commit: testsuite] master: new test cases for MultiWayIf w/ layout (da9750e)
git at git.haskell.org
git
Tue Oct 1 10:49:22 UTC 2013
Repository : ssh://git at git.haskell.org/testsuite
On branch : master
Link : http://ghc.haskell.org/trac/ghc/changeset/da9750e04d1821298a4b408cd4f607564ec0b82f/testsuite
>---------------------------------------------------------------
commit da9750e04d1821298a4b408cd4f607564ec0b82f
Author: Simon Marlow <marlowsd at gmail.com>
Date: Mon Sep 30 21:20:17 2013 +0100
new test cases for MultiWayIf w/ layout
>---------------------------------------------------------------
da9750e04d1821298a4b408cd4f607564ec0b82f
tests/parser/should_run/ParserMultiWayIf.hs | 9 +++++++--
1 file changed, 7 insertions(+), 2 deletions(-)
diff --git a/tests/parser/should_run/ParserMultiWayIf.hs b/tests/parser/should_run/ParserMultiWayIf.hs
index 83bd2e9..9e69a8f 100644
--- a/tests/parser/should_run/ParserMultiWayIf.hs
+++ b/tests/parser/should_run/ParserMultiWayIf.hs
@@ -7,9 +7,14 @@ x1 = if | x < 10 -> "< 10" | otherwise -> ""
x2 = if | x < 10 -> "< 10"
| otherwise -> ""
x3 = if | x < 10 -> "< 10"
- | otherwise -> ""
+ | otherwise -> ""
x4 = if | True -> "yes"
x5 = if | True -> if | False -> 1 | True -> 2
-main = print $ x5 == 2
+x6 = if | x < 10 -> if | True -> "yes"
+ | False -> "no"
+ | otherwise -> "maybe"
+
+x7 = (if | True -> 0)
+main = print $ x5 == 2 && x6 == "maybe" && x7 == 0
More information about the ghc-commits
mailing list