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