blob: 84966c4e7e923514b8b15e158d4bd87c94ef9d19 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
|
{-# LANGUAGE FlexibleInstances #-}
module ShouldFail where
class Foo a where
op :: a -> a
instance {-# OVERLAPPABLE #-} Foo a => Foo [a]
instance {-# OVERLAPPING #-} Foo [Int]
foo :: Foo a => [a] -> [a]
foo x = op x
-- Correct instance depends on instantiation of 'a'
|