summaryrefslogtreecommitdiff
path: root/testsuite/tests/patsyn/should_compile/ex-prov.hs
blob: 9225cf2e1c803518ba6163595bc9a4de141ddb2b (plain)
1
2
3
4
5
6
7
8
9
10
11
12
-- Pattern synonyms

{-# LANGUAGE PatternSynonyms, GADTs #-}
module ShouldCompile where

data T a where
	MkT :: (Eq b) => a -> b -> T a

pattern P x y <- MkT x y

f :: T Bool -> Bool
f (P x y) = x && y == y