[commit: ghc] wip/rae: Test #9064 in th/T9064 (fe71a7e)
git at git.haskell.org
git at git.haskell.org
Wed Nov 12 18:28:11 UTC 2014
Repository : ssh://git@git.haskell.org/ghc
On branch : wip/rae
Link : http://ghc.haskell.org/trac/ghc/changeset/fe71a7e6e3513ff18f7e6ec57284168c052262fc/ghc
>---------------------------------------------------------------
commit fe71a7e6e3513ff18f7e6ec57284168c052262fc
Author: Richard Eisenberg <eir at cis.upenn.edu>
Date: Tue Nov 4 15:28:40 2014 -0500
Test #9064 in th/T9064
>---------------------------------------------------------------
fe71a7e6e3513ff18f7e6ec57284168c052262fc
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 199ad15..86e7fd8 100644
--- a/testsuite/tests/th/all.T
+++ b/testsuite/tests/th/all.T
@@ -338,3 +338,4 @@ test('T9738', normal, compile, ['-v0'])
test('T9081', normal, compile, ['-v0'])
test('T9066', normal, compile, ['-v0'])
test('T8100', normal, compile, ['-v0'])
+test('T9064', expect_broken(9064), compile, ['-v0'])
More information about the ghc-commits
mailing list