diff options
Diffstat (limited to 'testsuite/tests/deSugar/should_compile/ds056.hs')
-rw-r--r-- | testsuite/tests/deSugar/should_compile/ds056.hs | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/testsuite/tests/deSugar/should_compile/ds056.hs b/testsuite/tests/deSugar/should_compile/ds056.hs new file mode 100644 index 0000000000..77c3860112 --- /dev/null +++ b/testsuite/tests/deSugar/should_compile/ds056.hs @@ -0,0 +1,14 @@ +-- Check overlap in n+k patterns + +{-# LANGUAGE NPlusKPatterns #-} + +module Foo where + +g :: Int -> Int +g (x+1) = x +g y = y +g _ = 0 -- Overlapped + +h :: Int -> Int +h (x+1) = x +h _ = 0 -- Not overlapped |