Delete ghctags cabal file
[ghc.git] / testsuite / tests / typecheck / should_compile / T5676.hs
1 {-# OPTIONS_GHC -fno-warn-redundant-constraints #-}
2 {-# LANGUAGE ScopedTypeVariables, InstanceSigs #-}
3 module Foo where
4
5 data T a = T a
6
7 class C a where
8 foo :: b -> a -> (a, [b])
9
10 instance C a => C (T a) where
11 foo :: forall b. b -> T a -> (T a, [b])
12 foo x (T y) = (T y, xs)
13 where
14 xs :: [b]
15 xs = [x,x,x]
16
17 instance Functor T where
18 fmap :: (a -> b) -> T a -> T b
19 fmap f (T x) = T (f x)
20