diff --git a/testsuite/tests/th/T7910.hs b/testsuite/tests/th/T7910.hs new file mode 100644 index 0000000000000000000000000000000000000000..d04436512d20d5a6ccbe7b8edae8974721d7ed54 --- /dev/null +++ b/testsuite/tests/th/T7910.hs @@ -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 index 0000000000000000000000000000000000000000..1fa0b54b36b8887d398d8c23a96d824bc1434eb7 --- /dev/null +++ b/testsuite/tests/th/T7910.stdout @@ -0,0 +1 @@ +(True,True) diff --git a/testsuite/tests/th/all.T b/testsuite/tests/th/all.T index 5ff833e890b198f9ad7f1bed17609d3908fea0de..ad1c4e97823c952baa70dfa11a93f9c8935d4cf8 100644 --- a/testsuite/tests/th/all.T +++ b/testsuite/tests/th/all.T @@ -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'])