Fix #11287.
[ghc.git] / testsuite / tests / th / T9064.hs
1 {-# LANGUAGE TemplateHaskell, DefaultSignatures #-}
2
3 module T9064 where
4
5 import Language.Haskell.TH
6 import System.IO
7
8 $( [d| class C a where
9 foo :: a -> String
10 default foo :: Show a => a -> String
11 foo = show |] )
12
13 data Bar = Bar deriving Show
14 instance C Bar
15
16 x :: Bar -> String
17 x = foo
18
19 $( do info <- reify ''C
20 runIO $ do
21 putStrLn $ pprint info
22 hFlush stdout
23 return [] )