summaryrefslogtreecommitdiff
path: root/testsuite/tests/deSugar/should_compile/ds038.hs
diff options
context:
space:
mode:
Diffstat (limited to 'testsuite/tests/deSugar/should_compile/ds038.hs')
-rw-r--r--testsuite/tests/deSugar/should_compile/ds038.hs12
1 files changed, 12 insertions, 0 deletions
diff --git a/testsuite/tests/deSugar/should_compile/ds038.hs b/testsuite/tests/deSugar/should_compile/ds038.hs
new file mode 100644
index 0000000000..3accf7cf42
--- /dev/null
+++ b/testsuite/tests/deSugar/should_compile/ds038.hs
@@ -0,0 +1,12 @@
+-- !!! Jon Hill reported a bug in desugaring this in 0.09
+-- !!! (recursive with n+k patts)
+--
+
+{-# LANGUAGE NPlusKPatterns #-}
+
+module ShouldCompile where
+
+takeList :: Int -> [a] -> [a]
+takeList 0 _ = []
+takeList (n+1) [] = []
+takeList (n+1) (x:xs) = x : takeList n xs