Major Overhaul of Pattern Match Checking (Fixes #595)
[ghc.git] / testsuite / tests / pmcheck / should_compile / T3927a.hs
1 {-# OPTIONS_GHC -fwarn-incomplete-patterns -fwarn-overlapping-patterns #-}
2 {-# LANGUAGE GADTs, TypeFamilies #-}
3
4 module T3927a where
5
6 type family F a
7 type instance F a = ()
8
9 data Foo a where
10 FooA :: Foo ()
11 FooB :: Foo Int
12
13 f :: a -> Foo (F a) -> () -- F a can only be () so only FooA is accepted
14 f _ FooA = ()
15