diff options
author | Krzysztof Gogolewski <krzysztof.gogolewski@tweag.io> | 2020-12-17 02:36:31 +0100 |
---|---|---|
committer | Marge Bot <ben+marge-bot@smart-cactus.org> | 2020-12-20 14:14:50 -0500 |
commit | 65721691ce9c4107d1cf84ad131bf167a9e42a7d (patch) | |
tree | 52524a8c7f639fb8aa6c24e864e50968af08779a /testsuite | |
parent | e84b02ab0f930e9dd5202fa4392490611dadfbb3 (diff) | |
download | haskell-65721691ce9c4107d1cf84ad131bf167a9e42a7d.tar.gz |
Improve inference with linear types
This fixes test Linear14. The code in Unify.hs was always using
multiplicity Many instead of a new metavariable.
Diffstat (limited to 'testsuite')
-rw-r--r-- | testsuite/tests/dependent/should_compile/dynamic-paper.stderr | 2 | ||||
-rw-r--r-- | testsuite/tests/linear/should_compile/all.T | 2 | ||||
-rw-r--r-- | testsuite/tests/typecheck/should_fail/T7869.stderr | 10 |
3 files changed, 8 insertions, 6 deletions
diff --git a/testsuite/tests/dependent/should_compile/dynamic-paper.stderr b/testsuite/tests/dependent/should_compile/dynamic-paper.stderr index 219f2879b0..b05335047f 100644 --- a/testsuite/tests/dependent/should_compile/dynamic-paper.stderr +++ b/testsuite/tests/dependent/should_compile/dynamic-paper.stderr @@ -12,4 +12,4 @@ Simplifier ticks exhausted simplifier non-termination has been judged acceptable. To see detailed counts use -ddump-simpl-stats - Total ticks: 136961 + Total ticks: 140801 diff --git a/testsuite/tests/linear/should_compile/all.T b/testsuite/tests/linear/should_compile/all.T index 0fa5750794..b72d1f2f3d 100644 --- a/testsuite/tests/linear/should_compile/all.T +++ b/testsuite/tests/linear/should_compile/all.T @@ -16,7 +16,7 @@ test('TupSection', normal, compile, ['']) test('Pr110', normal, compile, ['']) test('Linear10', normal, compile, ['']) test('Linear12', normal, compile, ['']) -test('Linear14', expect_broken(298), compile, ['']) +test('Linear14', normal, compile, ['']) test('Linear15', normal, compile, ['']) test('Linear16', normal, compile, ['']) test('Linear3', normal, compile, ['']) diff --git a/testsuite/tests/typecheck/should_fail/T7869.stderr b/testsuite/tests/typecheck/should_fail/T7869.stderr index 15e9cc4658..c599b276d9 100644 --- a/testsuite/tests/typecheck/should_fail/T7869.stderr +++ b/testsuite/tests/typecheck/should_fail/T7869.stderr @@ -1,16 +1,18 @@ T7869.hs:3:12: error: - • Couldn't match type ‘b1’ with ‘b’ + • Couldn't match type ‘a1’ with ‘a’ Expected: [a1] -> b1 Actual: [a] -> b - ‘b1’ is a rigid type variable bound by + ‘a1’ is a rigid type variable bound by an expression type signature: forall a1 b1. [a1] -> b1 at T7869.hs:3:20-27 - ‘b’ is a rigid type variable bound by + ‘a’ is a rigid type variable bound by the inferred type of f :: [a] -> b at T7869.hs:3:1-27 • In the expression: f x In the expression: (\ x -> f x) :: [a] -> b In an equation for ‘f’: f = (\ x -> f x) :: [a] -> b - • Relevant bindings include f :: [a] -> b (bound at T7869.hs:3:1) + • Relevant bindings include + x :: [a1] (bound at T7869.hs:3:7) + f :: [a] -> b (bound at T7869.hs:3:1) |