[commit: ghc] master: Add test for #15437 (ea01517)
git at git.haskell.org
git at git.haskell.org
Thu Nov 22 18:43:18 UTC 2018
Repository : ssh://git@git.haskell.org/ghc
On branch : master
Link : http://ghc.haskell.org/trac/ghc/changeset/ea01517247c9667b0728daadc5f687ef8fcf945e/ghc
>---------------------------------------------------------------
commit ea01517247c9667b0728daadc5f687ef8fcf945e
Author: Matthew Pickering <matthewtpickering at gmail.com>
Date: Thu Nov 22 11:38:10 2018 -0500
Add test for #15437
Reviewers: bgamari
Subscribers: rwbarton, carter
GHC Trac Issues: #15437
Differential Revision: https://phabricator.haskell.org/D5291
>---------------------------------------------------------------
ea01517247c9667b0728daadc5f687ef8fcf945e
testsuite/tests/th/T15437.hs | 7 +++++++
testsuite/tests/th/T15437A.hs | 12 ++++++++++++
testsuite/tests/th/all.T | 2 ++
3 files changed, 21 insertions(+)
diff --git a/testsuite/tests/th/T15437.hs b/testsuite/tests/th/T15437.hs
new file mode 100644
index 0000000..2251927
--- /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 0000000..c46581a
--- /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 adf8970..b158313 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])
More information about the ghc-commits
mailing list