diff options
author | Krzysztof Gogolewski <krzysztof.gogolewski@tweag.io> | 2021-07-29 20:23:53 +0200 |
---|---|---|
committer | Marge Bot <ben+marge-bot@smart-cactus.org> | 2021-08-02 04:18:00 -0400 |
commit | 13af2feeca20e10d7dda675ad0634689a1931f17 (patch) | |
tree | f2c4d214f187aa4b392551417db5d840deb9002a /testsuite/tests/linear/should_compile | |
parent | 20ef67a3776e3d2737dc385f67cb89c90199b20f (diff) | |
download | haskell-13af2feeca20e10d7dda675ad0634689a1931f17.tar.gz |
Disallow nonlinear fields in Template Haskell (#18378)
Diffstat (limited to 'testsuite/tests/linear/should_compile')
-rw-r--r-- | testsuite/tests/linear/should_compile/LinearTH4.hs | 6 | ||||
-rw-r--r-- | testsuite/tests/linear/should_compile/all.T | 1 |
2 files changed, 7 insertions, 0 deletions
diff --git a/testsuite/tests/linear/should_compile/LinearTH4.hs b/testsuite/tests/linear/should_compile/LinearTH4.hs new file mode 100644 index 0000000000..3061e77ce6 --- /dev/null +++ b/testsuite/tests/linear/should_compile/LinearTH4.hs @@ -0,0 +1,6 @@ +{-# LANGUAGE GADTs #-} +{-# LANGUAGE LinearTypes #-} +{-# LANGUAGE TemplateHaskell #-} +module LinearTH4 where + +$([d| data T where { MkT :: Int %1 -> T } |]) diff --git a/testsuite/tests/linear/should_compile/all.T b/testsuite/tests/linear/should_compile/all.T index 77cd913b81..b9d4215793 100644 --- a/testsuite/tests/linear/should_compile/all.T +++ b/testsuite/tests/linear/should_compile/all.T @@ -33,6 +33,7 @@ test('LinearLetRec', expect_broken(18694), compile, ['-O -dlinear-core-lint']) test('LinearTH1', normal, compile, ['']) test('LinearTH2', normal, compile, ['']) test('LinearTH3', normal, compile, ['']) +test('LinearTH4', normal, compile, ['']) test('LinearHole', normal, compile, ['']) test('T18731', normal, compile, ['']) test('T19400', unless(compiler_debugged(), skip), compile, ['']) |