summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKrzysztof Gogolewski <krzysztof.gogolewski@tweag.io>2021-02-03 12:19:12 +0100
committerKrzysztof Gogolewski <krzysztof.gogolewski@tweag.io>2021-02-03 12:25:07 +0100
commitfd94ebbed669be00fb71fbe9dd9f8a55aa614761 (patch)
tree5fdaeabfb854ff5d8110019d216858b70d519851
parentddbdec4128f0e6760c8c7a19344f2f2a7a3314bf (diff)
downloadhaskell-wip/T18736.tar.gz
Add a test for #18736wip/T18736
Commit 65721691ce9c (Improve inference with linear types, !4632) fixed the bug. Closes #18736.
-rw-r--r--testsuite/tests/linear/should_compile/LinearTH3.hs7
-rw-r--r--testsuite/tests/linear/should_compile/all.T1
2 files changed, 8 insertions, 0 deletions
diff --git a/testsuite/tests/linear/should_compile/LinearTH3.hs b/testsuite/tests/linear/should_compile/LinearTH3.hs
new file mode 100644
index 0000000000..7254dd8b92
--- /dev/null
+++ b/testsuite/tests/linear/should_compile/LinearTH3.hs
@@ -0,0 +1,7 @@
+{-# LANGUAGE TemplateHaskell, LinearTypes #-}
+module LinearTH3 where -- #18736
+
+import Language.Haskell.TH
+
+idenq :: Quote m => Code m (a %1 -> a)
+idenq = [|| \x -> x ||]
diff --git a/testsuite/tests/linear/should_compile/all.T b/testsuite/tests/linear/should_compile/all.T
index b72d1f2f3d..cea6db8d73 100644
--- a/testsuite/tests/linear/should_compile/all.T
+++ b/testsuite/tests/linear/should_compile/all.T
@@ -33,5 +33,6 @@ test('MultConstructor', normal, compile, [''])
test('LinearLetRec', expect_broken(405), compile, ['-O -dlinear-core-lint'])
test('LinearTH1', normal, compile, [''])
test('LinearTH2', normal, compile, [''])
+test('LinearTH3', normal, compile, [''])
test('LinearHole', normal, compile, [''])
test('T18731', normal, compile, [''])