summaryrefslogtreecommitdiff
path: root/testsuite/tests/codeGen/should_run/cgrun043.hs
diff options
context:
space:
mode:
Diffstat (limited to 'testsuite/tests/codeGen/should_run/cgrun043.hs')
-rw-r--r--testsuite/tests/codeGen/should_run/cgrun043.hs18
1 files changed, 18 insertions, 0 deletions
diff --git a/testsuite/tests/codeGen/should_run/cgrun043.hs b/testsuite/tests/codeGen/should_run/cgrun043.hs
new file mode 100644
index 0000000000..88de4c92f2
--- /dev/null
+++ b/testsuite/tests/codeGen/should_run/cgrun043.hs
@@ -0,0 +1,18 @@
+-- !!! Tickled a bug in core2stg
+-- !!! (CoreSyn.Coerce constructors were not peeled off
+-- !!! when converting CoreSyn.App)
+
+module Main where
+
+getData :: String -> IO ()
+getData filename = case leng filename of {0 -> return ()}
+leng :: String -> Int
+leng [] = 0 --case ls of {[] -> 0 ; (_:xs) -> 1 + leng xs }
+leng ls = leng ls
+
+f [] [] = []
+f xs ys = f xs ys
+
+main =
+ return () >>= \ _ ->
+ case f [] [] of { [] -> getData [] }