summaryrefslogtreecommitdiff
path: root/testsuite/tests/th/T9064.hs
diff options
context:
space:
mode:
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 [] )