summaryrefslogtreecommitdiff
path: root/testsuite/tests/th
diff options
context:
space:
mode:
authorMatthew Pickering <matthewtpickering@gmail.com>2018-11-22 11:38:10 -0500
committerBen Gamari <ben@smart-cactus.org>2018-11-22 12:11:16 -0500
commitea01517247c9667b0728daadc5f687ef8fcf945e (patch)
tree4f0ecb76b25c7fdc92f614073fed45f884c672e5 /testsuite/tests/th
parent4ba3fa31ddfa12b428bd67216a2d4118dc9e8311 (diff)
downloadhaskell-ea01517247c9667b0728daadc5f687ef8fcf945e.tar.gz
Add test for #15437
Reviewers: bgamari Subscribers: rwbarton, carter GHC Trac Issues: #15437 Differential Revision: https://phabricator.haskell.org/D5291
Diffstat (limited to 'testsuite/tests/th')
-rw-r--r--testsuite/tests/th/T15437.hs7
-rw-r--r--testsuite/tests/th/T15437A.hs12
-rw-r--r--testsuite/tests/th/all.T2
3 files changed, 21 insertions, 0 deletions
diff --git a/testsuite/tests/th/T15437.hs b/testsuite/tests/th/T15437.hs
new file mode 100644
index 0000000000..2251927698
--- /dev/null
+++ b/testsuite/tests/th/T15437.hs
@@ -0,0 +1,7 @@
+{-# LANGUAGE TemplateHaskell #-}
+module T15437 where
+
+import T15437A
+
+f :: Int
+f = $$(foo)
diff --git a/testsuite/tests/th/T15437A.hs b/testsuite/tests/th/T15437A.hs
new file mode 100644
index 0000000000..c46581a0fc
--- /dev/null
+++ b/testsuite/tests/th/T15437A.hs
@@ -0,0 +1,12 @@
+{-# LANGUAGE ScopedTypeVariables #-}
+{-# LANGUAGE TemplateHaskell #-}
+{-# LANGUAGE TypeApplications #-}
+module T15437A where
+
+import Language.Haskell.TH.Syntax (Q, TExp)
+
+get :: forall a. Int
+get = 1
+
+foo :: forall a. Q (TExp Int)
+foo = [|| get @a ||]
diff --git a/testsuite/tests/th/all.T b/testsuite/tests/th/all.T
index adf897081b..b1583138cc 100644
--- a/testsuite/tests/th/all.T
+++ b/testsuite/tests/th/all.T
@@ -449,3 +449,5 @@ test('T15792', normal, compile, ['-v0 -dsuppress-uniques'])
test('T15815', normal, multimod_compile,
['T15815B', '-v0 ' + config.ghc_th_way_flags])
test('T15845', normal, compile, ['-v0 -dsuppress-uniques'])
+test('T15437', expect_broken(15437), multimod_compile,
+ ['T15437', '-v0 ' + config.ghc_th_way_flags])