summaryrefslogtreecommitdiff
path: root/testsuite/tests/th/T15471.hs
diff options
context:
space:
mode:
authorMatthew Pickering <matthewtpickering@gmail.com>2019-01-09 14:52:30 +0000
committerMatthew Pickering <matthewtpickering@gmail.com>2019-01-11 03:45:33 -0500
commitc2455e647501c5a382861196b64df3dd05b620a2 (patch)
tree60b56e73488fc237acf76d3f40e782830a6ecf56 /testsuite/tests/th/T15471.hs
parent82d1a88dec216d761b17252ede760da5c566007f (diff)
downloadhaskell-c2455e647501c5a382861196b64df3dd05b620a2.tar.gz
Run typed splices in the zonker
Summary: This fixes #15471 In the typechecker we check that the splice has the right type but we crucially don't zonk the generated expression. This is because we might end up unifying type variables from outer scopes later on. Reviewers: simonpj, goldfire, bgamari Subscribers: rwbarton, carter GHC Trac Issues: #15471 Differential Revision: https://phabricator.haskell.org/D5286
Diffstat (limited to 'testsuite/tests/th/T15471.hs')
-rw-r--r--testsuite/tests/th/T15471.hs11
1 files changed, 11 insertions, 0 deletions
diff --git a/testsuite/tests/th/T15471.hs b/testsuite/tests/th/T15471.hs
new file mode 100644
index 0000000000..0f0abdf461
--- /dev/null
+++ b/testsuite/tests/th/T15471.hs
@@ -0,0 +1,11 @@
+{-# LANGUAGE TemplateHaskell #-}
+module T15471 where
+
+import T15471A
+
+
+qux = $$(test_foo)
+
+bar y = $$(list_foo [|| y ||] )
+
+main = print (qux 5) >> print (bar True)