summaryrefslogtreecommitdiff
path: root/testsuite/tests/typecheck/should_fail/tcfail106.hs
blob: 22c732e4ce868dcf27822bf3b6a3a90991f36176 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
-- This one risked building a recursive dictionary rather than
-- failing, in GHC before 5.03.   Actually, 5.02 managed it ok,
-- but I think more by luck than good judgement.

module ShouldFail where

class S a
class S a => C a where { opc :: a -> a }
class S b => D b where { opd :: b -> b }

instance C Int where
   opc = opd

instance D Int where
   opd = opc