blob: 4f6d4abab5bc91c4bb578d8ea2e0b62aa6cef187 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
|
{-# LANGUAGE GADTs #-}
{-# OPTIONS_GHC -fwarn-incomplete-patterns #-}
module T4139 where
data F a where
FInt :: F Int
FBool :: F Bool
class Baz a where
baz :: F a -> G a
instance Baz Int where
baz _ = GInt
instance Baz Bool where
baz _ = GBool
data G a where
GInt :: G Int
GBool :: G Bool
bar :: Baz a => F a -> ()
bar a@(FInt) =
case baz a of
GInt -> ()
-- GBool -> ()
bar _ = ()
|