summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMatthew Pickering <matthewtpickering@gmail.com>2022-05-31 17:39:34 +0100
committerMatthew Pickering <matthewtpickering@gmail.com>2022-05-31 17:39:34 +0100
commit7b9e40b9326671e5bcb1997b9d3b1a0d17a2e686 (patch)
treea3600f8c03e53aa32e8ddcfa04c384b894a7e81c
parentb998052b4dee931f608bdd8f4cf69ad64bc04239 (diff)
downloadhaskell-wip/romes/ttg-splices-improvements.tar.gz
Fixes #21619
-rw-r--r--testsuite/tests/quotes/T21619.hs10
-rw-r--r--testsuite/tests/quotes/all.T1
2 files changed, 11 insertions, 0 deletions
diff --git a/testsuite/tests/quotes/T21619.hs b/testsuite/tests/quotes/T21619.hs
new file mode 100644
index 0000000000..ae37efcb48
--- /dev/null
+++ b/testsuite/tests/quotes/T21619.hs
@@ -0,0 +1,10 @@
+{-# LANGUAGE TemplateHaskell #-}
+{-# OPTIONS_GHC -fwrite-ide-info #-}
+module M where
+
+import Language.Haskell.TH.Syntax
+
+newtype T = T { getT :: Int }
+
+instance Lift T where
+ liftTyped v = [||T $$(liftTyped (getT v))||]
diff --git a/testsuite/tests/quotes/all.T b/testsuite/tests/quotes/all.T
index 1d145e8781..4a39f454b3 100644
--- a/testsuite/tests/quotes/all.T
+++ b/testsuite/tests/quotes/all.T
@@ -40,3 +40,4 @@ test('TTH_top_splice', normal, compile_fail, [''])
test('TH_double_splice', normal, compile_fail, [''])
test('T20688', normal, compile, ['-Wimplicit-lift -Werror'])
test('T20893', normal, compile_and_run, [''])
+test('T21619', normal, compile, [''])