summaryrefslogtreecommitdiff
path: root/testsuite/tests/ghc-regress/deSugar/should_compile/ds038.hs
blob: 3accf7cf42d888b5d92846b695c15a07a34c202a (plain)
1
2
3
4
5
6
7
8
9
10
11
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