summaryrefslogtreecommitdiff
path: root/testsuite/tests/th/T9064.hs
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 /testsuite/tests/th/T9064.hs
parent4ac9e902327683ba032df5fb0e92a80c7b7fccd4 (diff)
downloadhaskell-fe71a7e6e3513ff18f7e6ec57284168c052262fc.tar.gz
Test #9064 in th/T9064
Diffstat (limited to 'testsuite/tests/th/T9064.hs')
-rw-r--r--testsuite/tests/th/T9064.hs23
1 files changed, 23 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 [] )