summaryrefslogtreecommitdiff
path: root/testsuite/tests/quotes/T18263.hs
diff options
context:
space:
mode:
Diffstat (limited to 'testsuite/tests/quotes/T18263.hs')
-rw-r--r--testsuite/tests/quotes/T18263.hs9
1 files changed, 8 insertions, 1 deletions
diff --git a/testsuite/tests/quotes/T18263.hs b/testsuite/tests/quotes/T18263.hs
index 10e923480b..57f20fbf49 100644
--- a/testsuite/tests/quotes/T18263.hs
+++ b/testsuite/tests/quotes/T18263.hs
@@ -13,14 +13,21 @@ When looking up something with 'lookupGlobalOccRn_maybe', which is called by
This should still fail to compile though, as reify should complain that "x"
isn't in the type environment, albeit with one less error.
+
+Later (March 2021): actually this should really compile fine:
+ * The [d| ... |] splices in a top-level binding for x
+ * The reify looks for that binding
+It was really a bug that it didn't work, now fixed.
+
-}
module T18263 where
import Language.Haskell.TH
import Language.Haskell.TH.Syntax
+import System.IO
do
n <- newName "x"
- addModFinalizer $ reify n >>= runIO . print
+ addModFinalizer $ reify n >>= runIO . hPrint stderr
[d| $(varP n) = 42 |]