diff options
author | Krzysztof Gogolewski <krzysztof.gogolewski@tweag.io> | 2021-02-03 12:19:12 +0100 |
---|---|---|
committer | Marge Bot <ben+marge-bot@smart-cactus.org> | 2021-02-06 09:29:17 -0500 |
commit | 4e6bb3267abd38744551d421757c7f834941223c (patch) | |
tree | ba353d1308b1e7780608071b8a59e4ec57bddec6 /testsuite/tests | |
parent | d93d7fc635aaef0ceb2e288b7a2c0e412bb6656d (diff) | |
download | haskell-4e6bb3267abd38744551d421757c7f834941223c.tar.gz |
Add a test for #18736
Commit 65721691ce9c (Improve inference with linear types, !4632)
fixed the bug.
Closes #18736.
Diffstat (limited to 'testsuite/tests')
-rw-r--r-- | testsuite/tests/linear/should_compile/LinearTH3.hs | 7 | ||||
-rw-r--r-- | testsuite/tests/linear/should_compile/all.T | 1 |
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, ['']) |