blob: aa3f1a489bbd28b2fe75e32e189a125bca8e0ced (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
|
{-# LANGUAGE FlexibleInstances #-}
-- This doesn't work: GHC MUST pick the wrong one!
-- {-# LANGUAGE IncoherentInstances #-}
unit p where
signature A where
data K a
instance Show a => Show (K a)
unit q where
signature A where
data K a
instance Read a => Show (K a)
unit r where
dependency p[A=<A>]
dependency q[A=<A>]
module R where
import A
f :: Show a => K a -> String
f = show
g :: Read a => K a -> String
g = show
|