diff options
author | Richard Eisenberg <eir@cis.upenn.edu> | 2014-11-04 15:28:40 -0500 |
---|---|---|
committer | Richard Eisenberg <eir@cis.upenn.edu> | 2014-11-12 12:36:40 -0500 |
commit | fe71a7e6e3513ff18f7e6ec57284168c052262fc (patch) | |
tree | 0d18a1953831e74e5de172abc93566cbc89baea8 /testsuite/tests/th/T9064.hs | |
parent | 4ac9e902327683ba032df5fb0e92a80c7b7fccd4 (diff) | |
download | haskell-fe71a7e6e3513ff18f7e6ec57284168c052262fc.tar.gz |
Test #9064 in th/T9064
Diffstat (limited to 'testsuite/tests/th/T9064.hs')
-rw-r--r-- | testsuite/tests/th/T9064.hs | 23 |
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 [] ) |