From f9763a53465232a1b0ec4668cbf9ef36dc812922 Mon Sep 17 00:00:00 2001 From: Simon Peyton Jones Date: Wed, 15 May 2013 10:19:21 +0100 Subject: [PATCH] Test Trac #7910 --- testsuite/tests/th/T7910.hs | 16 ++++++++++++++++ testsuite/tests/th/T7910.stdout | 1 + testsuite/tests/th/all.T | 3 ++- 3 files changed, 19 insertions(+), 1 deletion(-) create mode 100644 testsuite/tests/th/T7910.hs create mode 100644 testsuite/tests/th/T7910.stdout diff --git a/testsuite/tests/th/T7910.hs b/testsuite/tests/th/T7910.hs new file mode 100644 index 0000000000..d04436512d --- /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 0000000000..1fa0b54b36 --- /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 5ff833e890..ad1c4e9782 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']) -- GitLab