summaryrefslogtreecommitdiff
path: root/testsuite/tests/parser/should_compile/read042.hs
diff options
context:
space:
mode:
Diffstat (limited to 'testsuite/tests/parser/should_compile/read042.hs')
-rw-r--r--testsuite/tests/parser/should_compile/read042.hs29
1 files changed, 29 insertions, 0 deletions
diff --git a/testsuite/tests/parser/should_compile/read042.hs b/testsuite/tests/parser/should_compile/read042.hs
new file mode 100644
index 0000000000..922b7b12bb
--- /dev/null
+++ b/testsuite/tests/parser/should_compile/read042.hs
@@ -0,0 +1,29 @@
+{-# OPTIONS -XBangPatterns #-}
+
+-- Various bang-pattern and lazy-pattern tests
+
+module ShouldCompile where
+
+main1,main2,main3,main4,main5,main6,main7 :: IO ()
+
+main1 = do
+ !c <- return ()
+ return ()
+
+main2 = return () >>= \ !c -> return ()
+
+main3 = do
+ (!c) <- return ()
+ return ()
+
+main4 = return () >>= \ (!c) -> return ()
+
+main5 = let !x = 1 in return ()
+
+main6 = do
+ ~c <- return ()
+ return ()
+
+main7 = return () >>= \ ~c -> return ()
+
+