Fold base.git into ghc.git (re #8545)
[ghc.git] / testsuite / tests / typecheck / should_fail / tcfail121.hs
1
2 {-# LANGUAGE OverlappingInstances, FlexibleInstances #-}
3
4 module ShouldFail where
5
6 class Foo a where
7 op :: a -> a
8
9 instance Foo a => Foo [a]
10 instance Foo [Int]
11
12 foo :: Foo a => [a] -> [a]
13 foo x = op x
14 -- Correct instance depends on instantiation of 'a'