diff options
Diffstat (limited to 'testsuite/tests/typecheck/should_compile/tc169.hs')
-rw-r--r-- | testsuite/tests/typecheck/should_compile/tc169.hs | 27 |
1 files changed, 27 insertions, 0 deletions
diff --git a/testsuite/tests/typecheck/should_compile/tc169.hs b/testsuite/tests/typecheck/should_compile/tc169.hs new file mode 100644 index 0000000000..7cb9e001f5 --- /dev/null +++ b/testsuite/tests/typecheck/should_compile/tc169.hs @@ -0,0 +1,27 @@ +-- This one briefly killed the new GHC 6.4 + +module Foo where + +newtype Foo x = Foo x +-- data Foo x = Foo x -- this works + +class X a where + x :: a -> IO () + +class X a => Y a where + y :: [a] -> IO () + +class Z z where + z :: Y c => z c -> IO () + +instance X Char where + x = putChar +instance X a => X (Foo a) where + x (Foo foo) = x foo + +instance Y Char where + y cs = mapM_ x cs + +instance Z Foo where + z = x + |