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