Test Trac #4135
authorSimon Peyton Jones <simonpj@microsoft.com>
Tue, 20 Mar 2012 09:40:06 +0000 (09:40 +0000)
committerSimon Peyton Jones <simonpj@microsoft.com>
Tue, 20 Mar 2012 09:40:06 +0000 (09:40 +0000)
testsuite/tests/th/T4135.hs [new file with mode: 0644]
testsuite/tests/th/T4135.stdout [new file with mode: 0644]
testsuite/tests/th/all.T

diff --git a/testsuite/tests/th/T4135.hs b/testsuite/tests/th/T4135.hs
new file mode 100644 (file)
index 0000000..03ff2fe
--- /dev/null
@@ -0,0 +1,16 @@
+{-# LANGUAGE TypeFamilies,TemplateHaskell #-}
+module Bug where
+
+import Language.Haskell.TH
+import System.IO
+
+class C a where
+    type T a
+
+$(do { ds <- [d|  
+                instance C (Maybe a) where
+                   type T (Maybe a) = Char
+             |]
+     ; runIO $ do { putStrLn (pprint ds); hFlush stdout }
+     ; return ds })
+
diff --git a/testsuite/tests/th/T4135.stdout b/testsuite/tests/th/T4135.stdout
new file mode 100644 (file)
index 0000000..0519ecb
--- /dev/null
@@ -0,0 +1 @@
\ No newline at end of file
index 6fb56a8..e692d28 100644 (file)
@@ -225,4 +225,5 @@ test('T5883', normal, compile, ['-v0 -dsuppress-uniques -ddump-splices'])
 test('T5882', normal, compile, ['-v0'])
 test('T5886', extra_clean(['T5886a.hi','T5886a.o']), 
               multimod_compile, ['T5886','-v0'])
+test('T4135', normal, compile, ['-v0'])