summaryrefslogtreecommitdiff
path: root/testsuite/tests/typecheck/should_compile/tc045.hs
blob: acaad96b36f2556b93e109776bd3aab8b8bb73c9 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
{-# OPTIONS_GHC -fno-warn-redundant-constraints #-}
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
-}