summaryrefslogtreecommitdiff
path: root/testsuite
diff options
context:
space:
mode:
Diffstat (limited to 'testsuite')
-rw-r--r--testsuite/tests/th/T20590.hs8
-rw-r--r--testsuite/tests/th/T20590.stderr4
-rw-r--r--testsuite/tests/th/all.T1
3 files changed, 13 insertions, 0 deletions
diff --git a/testsuite/tests/th/T20590.hs b/testsuite/tests/th/T20590.hs
new file mode 100644
index 0000000000..68ee97267a
--- /dev/null
+++ b/testsuite/tests/th/T20590.hs
@@ -0,0 +1,8 @@
+{-# LANGUAGE GADTs #-}
+{-# LANGUAGE ScopedTypeVariables #-}
+{-# LANGUAGE TemplateHaskell #-}
+module T20590 where
+
+$([d| data T where
+ MkT :: forall a. a -> T
+ |])
diff --git a/testsuite/tests/th/T20590.stderr b/testsuite/tests/th/T20590.stderr
new file mode 100644
index 0000000000..9d06f592a5
--- /dev/null
+++ b/testsuite/tests/th/T20590.stderr
@@ -0,0 +1,4 @@
+T20590.hs:(6,2)-(8,7): Splicing declarations
+ [d| data T where MkT :: forall a. a -> T |]
+ ======>
+ data T where MkT :: forall a. a -> T
diff --git a/testsuite/tests/th/all.T b/testsuite/tests/th/all.T
index a5c4610598..439e88cd9a 100644
--- a/testsuite/tests/th/all.T
+++ b/testsuite/tests/th/all.T
@@ -537,3 +537,4 @@ test('T17820b', normal, compile_fail, [''])
test('T17820c', normal, compile_fail, [''])
test('T17820d', normal, compile_fail, [''])
test('T17820e', normal, compile_fail, [''])
+test('T20590', normal, compile, ['-v0 -ddump-splices -dsuppress-uniques'])