summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRichard Eisenberg <eir@cis.upenn.edu>2014-11-04 15:28:40 -0500
committerRichard Eisenberg <eir@cis.upenn.edu>2014-11-12 12:36:40 -0500
commitfe71a7e6e3513ff18f7e6ec57284168c052262fc (patch)
tree0d18a1953831e74e5de172abc93566cbc89baea8
parent4ac9e902327683ba032df5fb0e92a80c7b7fccd4 (diff)
downloadhaskell-fe71a7e6e3513ff18f7e6ec57284168c052262fc.tar.gz
Test #9064 in th/T9064
-rw-r--r--testsuite/tests/th/T9064.hs23
-rw-r--r--testsuite/tests/th/T9064.stderr7
-rw-r--r--testsuite/tests/th/all.T1
3 files changed, 31 insertions, 0 deletions
diff --git a/testsuite/tests/th/T9064.hs b/testsuite/tests/th/T9064.hs
new file mode 100644
index 0000000000..3451e2e77e
--- /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 0000000000..f9c171683d
--- /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 199ad15347..86e7fd87f8 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'])