summaryrefslogtreecommitdiff
path: root/testsuite/tests/patsyn/should_compile/T14630.hs
blob: 04aee670381d2be90a5e516f9f88b6dca856c32d (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
{-# LANGUAGE PatternSynonyms #-}
{-# LANGUAGE RecordWildCards #-}
{-# LANGUAGE NamedFieldPuns  #-}

module T14630 where

pattern Tuple :: a -> b -> (a, b)
pattern Tuple{x, y} = (x, y)

{-# COMPLETE Tuple #-}

f :: (a, b) -> a
f Tuple{x} = x

g :: (Int, Int) -> Int
g Tuple{..} = x + y