testsuite: Assert that testsuite ways are known
[ghc.git] / testsuite / tests / typecheck / should_compile / tc118.hs
1 {-# LANGUAGE MultiParamTypeClasses, FunctionalDependencies,
2 UndecidableInstances #-}
3
4 -- !!! An instance decl with a context containing a free type variable
5 -- The interest here is that there's a "b" in the instance decl
6 -- context that isn't mentioned in the instance head.
7 -- Hence UndecidableInstances
8
9 module ShouldCompile where
10
11 class HasConverter a b | a -> b where
12 convert :: a -> b
13
14 data Foo a = MkFoo a
15
16 instance (HasConverter a b,Show b) => Show (Foo a) where
17 show (MkFoo value) = show (convert value)
18