From 7b9e40b9326671e5bcb1997b9d3b1a0d17a2e686 Mon Sep 17 00:00:00 2001 From: Matthew Pickering Date: Tue, 31 May 2022 17:39:34 +0100 Subject: Add test for #21619 Fixes #21619 --- testsuite/tests/quotes/T21619.hs | 10 ++++++++++ testsuite/tests/quotes/all.T | 1 + 2 files changed, 11 insertions(+) create mode 100644 testsuite/tests/quotes/T21619.hs 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, ['']) -- cgit v1.2.1