summaryrefslogtreecommitdiff
path: root/testsuite/tests/typecheck/should_compile/tc200.hs
blob: ef799c61d12052e2c1b20256a1b88b334e4ca473 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
{-# OPTIONS_GHC -w #-}
{-# LANGUAGE ConstrainedClassMethods #-}  -- Needed for 'baz'

-- A nasty case that crashed GHC 6.4 with a Lint error; 
-- see Note [Multiple instantiation] in TcExpr

module ShouldCompile where

class C a where
  foo :: Eq b => b -> a -> Int
  baz :: Eq a => Int -> a -> Int

instance C Int where
  baz = foo