Add test for #15437
authorMatthew Pickering <matthewtpickering@gmail.com>
Thu, 22 Nov 2018 16:38:10 +0000 (11:38 -0500)
committerBen Gamari <ben@smart-cactus.org>
Thu, 22 Nov 2018 17:11:16 +0000 (12:11 -0500)
Reviewers: bgamari

Subscribers: rwbarton, carter

GHC Trac Issues: #15437

Differential Revision: https://phabricator.haskell.org/D5291

testsuite/tests/th/T15437.hs [new file with mode: 0644]
testsuite/tests/th/T15437A.hs [new file with mode: 0644]
testsuite/tests/th/all.T

diff --git a/testsuite/tests/th/T15437.hs b/testsuite/tests/th/T15437.hs
new file mode 100644 (file)
index 0000000..2251927
--- /dev/null
@@ -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 (file)
index 0000000..c46581a
--- /dev/null
@@ -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 ||]
index adf8970..b158313 100644 (file)
@@ -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])