blob: 26a8f083d284b3e7e1b0b4650995cbea86ffe7ac (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
|
{-# LANGUAGE UndecidableInstances,
MultiParamTypeClasses, FunctionalDependencies #-}
-- The Show instance for S would have form
-- instance X T c => Show S
-- which is hard to deal with. It sent GHC 5.01 into
-- an infinite loop; now it should be rejected.
module ShouldFail where
data T = T Integer
class X a b | a -> b where
f :: a -> b
instance X T c => Show T where
show _ = ""
data S = S T deriving Show
|