X-Git-Url: http://git.megacz.com/?a=blobdiff_plain;ds=sidebyside;f=ghc%2Ftests%2Ftypecheck%2Fshould_run%2Ftcrun009.hs;fp=ghc%2Ftests%2Ftypecheck%2Fshould_run%2Ftcrun009.hs;h=0000000000000000000000000000000000000000;hb=16acb4976514ab4b03c79d6845e3f0e98a1a33cf;hp=328614fdb33c0093c6550b463a71c84e96bb367c;hpb=f2eadfd5dfb23cc611e2540f46180bca7d095f15;p=ghc-hetmet.git diff --git a/ghc/tests/typecheck/should_run/tcrun009.hs b/ghc/tests/typecheck/should_run/tcrun009.hs deleted file mode 100644 index 328614f..0000000 --- a/ghc/tests/typecheck/should_run/tcrun009.hs +++ /dev/null @@ -1,25 +0,0 @@ -{-# OPTIONS -fglasgow-exts #-} - --- !!! Functional dependencies - -module Main where - -class Foo a b | a -> b where - foo :: a -> b - -instance Foo [a] (Maybe a) where - foo [] = Nothing - foo (x:_) = Just x - -instance Foo (Maybe a) [a] where - foo Nothing = [] - foo (Just x) = [x] - -test3:: [a] -> [b] -test3 = foo . foo --- First foo must use the first instance, --- second must use the second. So we should --- get in effect: test3 (x:xs) = [x] - -main:: IO () -main = print (test3 "foo" :: [Int])