summaryrefslogtreecommitdiff
path: root/testsuite/tests/typecheck/should_compile/T5514.hs
blob: 539886b4c5b89d0d547c95e2ada3903c92294087 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
{-# OPTIONS_GHC -fno-warn-redundant-constraints #-}
module T5514 where

class Foo a where
        foo :: a -> a

instance (Foo a, Foo b) => Foo (a, b) where
        foo = foo' ()

-- foo' :: () -> b -> b
foo' es = const id (unitId es)

unitId :: () -> ()
unitId = id