summaryrefslogtreecommitdiff
path: root/testsuite/tests/typecheck/should_compile/tc045.hs
blob: 4ff376667322ff0fd2c3251996d5e02e890d89e2 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
module ShouldSucceed where

class C a where
 op1 :: a -> a

class (C a) => B a where
 op2 :: a -> a -> a

instance (B a) => B [a] where
 op2 xs ys = xs

instance C [a] where
 op1 xs = xs

{- This was passed by the prototype, but failed hard in the new
typechecker with the message

Fail:No match in theta_class
-}