SCC analysis for instances as well as types/classes
[ghc.git] / testsuite / tests / typecheck / should_compile / T7641.hs
1 {-# LANGUAGE FlexibleInstances #-}
2 {-# LANGUAGE MultiParamTypeClasses #-}
3
4 module T7641 where
5
6 data Foo b = Foo deriving Show
7
8 class ToFoo a b where
9 toFoo :: a -> Foo b
10
11 instance ToFoo (c -> ()) b where
12 toFoo _ = Foo
13
14 baz () = toFoo $ \_ -> ()