diff options
author | Krzysztof Gogolewski <krzysztof.gogolewski@tweag.io> | 2021-06-19 21:44:17 +0200 |
---|---|---|
committer | Krzysztof Gogolewski <krzysztof.gogolewski@tweag.io> | 2021-06-23 23:16:37 +0200 |
commit | 09be2b2b3cd1aaccdc7afa5a69d39d8b2fc0a6f0 (patch) | |
tree | 1a7664324e0ded59d755d2518a532ff69398fb18 /testsuite | |
parent | 633bbc1fd4762a2bb73ba1c5b9e0c279f1dd3c40 (diff) | |
download | haskell-wip/runtime-error-fixes.tar.gz |
Fixes around incomplete guards (#20023, #20024)wip/runtime-error-fixes
- Fix linearity error with incomplete MultiWayIf (#20023)
- Fix partial pattern binding error message (#20024)
- Remove obsolete test LinearPolyTest
It tested the special typing rule for ($), which was removed
during the implementation of Quick Look 97cff9190d3.
- Fix ticket numbers in linear/*/all.T, they referred to linear types
issue tracker
Diffstat (limited to 'testsuite')
-rw-r--r-- | testsuite/tests/deSugar/should_run/T20024.hs | 2 | ||||
-rw-r--r-- | testsuite/tests/deSugar/should_run/T20024.stderr | 2 | ||||
-rw-r--r-- | testsuite/tests/deSugar/should_run/all.T | 1 | ||||
-rw-r--r-- | testsuite/tests/linear/should_compile/LinearPolyDollar.hs | 10 | ||||
-rw-r--r-- | testsuite/tests/linear/should_compile/T20023.hs | 5 | ||||
-rw-r--r-- | testsuite/tests/linear/should_compile/all.T | 4 | ||||
-rw-r--r-- | testsuite/tests/linear/should_fail/all.T | 2 |
7 files changed, 13 insertions, 13 deletions
diff --git a/testsuite/tests/deSugar/should_run/T20024.hs b/testsuite/tests/deSugar/should_run/T20024.hs new file mode 100644 index 0000000000..560c48852b --- /dev/null +++ b/testsuite/tests/deSugar/should_run/T20024.hs @@ -0,0 +1,2 @@ +module Main where +main = let (x,y) | False = (1,2) in print x diff --git a/testsuite/tests/deSugar/should_run/T20024.stderr b/testsuite/tests/deSugar/should_run/T20024.stderr new file mode 100644 index 0000000000..24e6227fdc --- /dev/null +++ b/testsuite/tests/deSugar/should_run/T20024.stderr @@ -0,0 +1,2 @@ +T20024: T20024.hs:2:12-32: Non-exhaustive guards in pattern binding + diff --git a/testsuite/tests/deSugar/should_run/all.T b/testsuite/tests/deSugar/should_run/all.T index c9ef02c074..ce3185c213 100644 --- a/testsuite/tests/deSugar/should_run/all.T +++ b/testsuite/tests/deSugar/should_run/all.T @@ -73,3 +73,4 @@ test('DsMonadCompFailMsg', exit_code(1), compile_and_run, ['']) test('T19289', normal, compile_and_run, ['']) test('T19680', normal, compile_and_run, ['']) test('T19680A', normal, compile_and_run, ['']) +test('T20024', exit_code(1), compile_and_run, ['']) diff --git a/testsuite/tests/linear/should_compile/LinearPolyDollar.hs b/testsuite/tests/linear/should_compile/LinearPolyDollar.hs deleted file mode 100644 index 7d14351cfc..0000000000 --- a/testsuite/tests/linear/should_compile/LinearPolyDollar.hs +++ /dev/null @@ -1,10 +0,0 @@ -{-# LANGUAGE LinearTypes #-} - -module LinearPolyDollar where - --- The goal of this test is to ensure that the special typing rule of ($) plays --- well with multiplicity-polymorphic functions - -data F = F Bool - -x = F $ True diff --git a/testsuite/tests/linear/should_compile/T20023.hs b/testsuite/tests/linear/should_compile/T20023.hs new file mode 100644 index 0000000000..13fd8a1dd5 --- /dev/null +++ b/testsuite/tests/linear/should_compile/T20023.hs @@ -0,0 +1,5 @@ +{-# LANGUAGE LinearTypes, MultiWayIf #-} +module T20023 where + +f :: Bool -> a %1-> a +f b x = if | b -> x diff --git a/testsuite/tests/linear/should_compile/all.T b/testsuite/tests/linear/should_compile/all.T index 17e04ca94a..77cd913b81 100644 --- a/testsuite/tests/linear/should_compile/all.T +++ b/testsuite/tests/linear/should_compile/all.T @@ -24,16 +24,16 @@ test('Linear4', normal, compile, ['']) test('Linear6', normal, compile, ['']) test('Linear8', normal, compile, ['']) test('LinearGuards', normal, compile, ['']) -test('LinearPolyDollar', normal, compile, ['']) test('LinearConstructors', normal, compile, ['']) test('Linear1Rule', normal, compile, ['']) test('LinearEmptyCase', normal, compile, ['']) test('Tunboxer', normal, compile, ['']) test('MultConstructor', expect_broken(19165), compile, ['']) -test('LinearLetRec', expect_broken(405), compile, ['-O -dlinear-core-lint']) +test('LinearLetRec', expect_broken(18694), 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, ['']) test('T19400', unless(compiler_debugged(), skip), compile, ['']) +test('T20023', normal, compile, ['']) diff --git a/testsuite/tests/linear/should_fail/all.T b/testsuite/tests/linear/should_fail/all.T index 3dbf154705..a831011cef 100644 --- a/testsuite/tests/linear/should_fail/all.T +++ b/testsuite/tests/linear/should_fail/all.T @@ -25,7 +25,7 @@ test('LinearKind2', normal, compile_fail, ['']) test('LinearKind3', normal, compile_fail, ['']) test('LinearVar', normal, compile_fail, ['-XLinearTypes']) test('LinearErrOrigin', normal, compile_fail, ['-XLinearTypes']) -test('LinearPolyType', normal, compile_fail, ['']) # not supported yet (#390) +test('LinearPolyType', normal, compile_fail, ['']) # not supported yet (#19517) test('LinearBottomMult', normal, compile_fail, ['']) test('LinearSequenceExpr', normal, compile_fail, ['']) test('LinearIf', normal, compile_fail, ['']) |