Test Trac #7910
authorSimon Peyton Jones <simonpj@microsoft.com>
Wed, 15 May 2013 09:19:21 +0000 (10:19 +0100)
committerSimon Peyton Jones <simonpj@microsoft.com>
Wed, 15 May 2013 09:19:21 +0000 (10:19 +0100)
testsuite/tests/th/T7910.hs [new file with mode: 0644]
testsuite/tests/th/T7910.stdout [new file with mode: 0644]
testsuite/tests/th/all.T

diff --git a/testsuite/tests/th/T7910.hs b/testsuite/tests/th/T7910.hs
new file mode 100644 (file)
index 0000000..d044365
--- /dev/null
@@ -0,0 +1,16 @@
+{-# LANGUAGE ConstraintKinds #-}
+{-# LANGUAGE TemplateHaskell #-}
+module Main where
+
+import Language.Haskell.TH
+import Language.Haskell.TH.Syntax
+
+class C a
+instance C Int
+
+type D a = C a
+
+main = print $(
+  do isCInst <- isInstance ''C [ConT ''Int]
+     isDInst <- isInstance ''D [ConT ''Int]
+     lift (isCInst,isDInst))
diff --git a/testsuite/tests/th/T7910.stdout b/testsuite/tests/th/T7910.stdout
new file mode 100644 (file)
index 0000000..1fa0b54
--- /dev/null
@@ -0,0 +1 @@
+(True,True)
index 5ff833e..ad1c4e9 100644 (file)
@@ -273,4 +273,5 @@ test('T7532',
      ['T7532', '-v0 ' + config.ghc_th_way_flags])
 test('T2222', normal, compile, ['-v0'])
 test('T1849', normal, ghci_script, ['T1849.script'])
-test('T7681', normal, compile, ['-v0'])
\ No newline at end of file
+test('T7681', normal, compile, ['-v0'])
+test('T7910', normal, compile_and_run, ['-v0'])