[commit: ghc] wip/rae: Test #9064 in th/T9064 (c9f633a)

git at git.haskell.org git at git.haskell.org
Wed Nov 5 15:53:48 UTC 2014


Repository : ssh://git@git.haskell.org/ghc

On branch  : wip/rae
Link       : http://ghc.haskell.org/trac/ghc/changeset/c9f633a968bab06e9c59720508821024c2794bce/ghc

>---------------------------------------------------------------

commit c9f633a968bab06e9c59720508821024c2794bce
Author: Richard Eisenberg <eir at cis.upenn.edu>
Date:   Tue Nov 4 15:28:40 2014 -0500

    Test #9064 in th/T9064


>---------------------------------------------------------------

c9f633a968bab06e9c59720508821024c2794bce
 testsuite/tests/th/T9064.hs     | 23 +++++++++++++++++++++++
 testsuite/tests/th/T9064.stderr |  7 +++++++
 testsuite/tests/th/all.T        |  1 +
 3 files changed, 31 insertions(+)

diff --git a/testsuite/tests/th/T9064.hs b/testsuite/tests/th/T9064.hs
new file mode 100644
index 0000000..3451e2e
--- /dev/null
+++ b/testsuite/tests/th/T9064.hs
@@ -0,0 +1,23 @@
+{-# LANGUAGE TemplateHaskell, DefaultSignatures #-}
+
+module T9064 where
+
+import Language.Haskell.TH
+import System.IO
+
+$( [d| class C a where
+         foo :: a -> String
+         default foo :: Show a => a -> String
+         foo = show |] )
+
+data Bar = Bar deriving Show
+instance C Bar
+
+x :: Bar -> String
+x = foo
+
+$( do info <- reify ''C
+      runIO $ do
+        putStrLn $ pprint info
+        hFlush stdout
+      return [] )
diff --git a/testsuite/tests/th/T9064.stderr b/testsuite/tests/th/T9064.stderr
new file mode 100644
index 0000000..f9c1716
--- /dev/null
+++ b/testsuite/tests/th/T9064.stderr
@@ -0,0 +1,7 @@
+class T9064.C (a_0 :: *)
+    where T9064.foo :: forall (a_0 :: *) . T9064.C a_0 =>
+                                           a_0 -> GHC.Base.String
+          default T9064.foo :: forall (a_0 :: *) . (T9064.C a_0,
+                                                    GHC.Show.Show a_0) =>
+                                                   a_0 -> GHC.Base.String
+instance T9064.C T9064.Bar
diff --git a/testsuite/tests/th/all.T b/testsuite/tests/th/all.T
index d9783bb..ac0d2f5 100644
--- a/testsuite/tests/th/all.T
+++ b/testsuite/tests/th/all.T
@@ -342,3 +342,4 @@ test('T7484', normal, compile_fail, ['-v0'])
 test('T1476', normal, compile, ['-v0'])
 test('T1476b', normal, compile_fail, ['-v0'])
 test('T8100', normal, compile, ['-v0'])
+test('T9064', expect_broken(9064), compile, ['-v0'])



More information about the ghc-commits mailing list