diff options
author | Sylvain Henry <sylvain@haskus.fr> | 2020-11-19 00:34:42 +0100 |
---|---|---|
committer | Marge Bot <ben+marge-bot@smart-cactus.org> | 2020-12-11 22:40:08 -0500 |
commit | f9f9f030d77ee6fb882897246a67b527937b8f66 (patch) | |
tree | 56b65ba78ded001f22e75bbac9bf10c110e81ecc /testsuite | |
parent | 5feb9b2dad0ce609e3cfb537a6ca758a09a6898e (diff) | |
download | haskell-f9f9f030d77ee6fb882897246a67b527937b8f66.tar.gz |
Arrows: correctly query arrow methods (#17423)
Consider the following code:
proc (C x y) -> ...
Before this patch, the evidence binding for the Arrow dictionary was
attached to the C pattern:
proc (C x y) { $dArrow = ... } -> ...
But then when we desugar this, we use arrow operations ("arr", ">>>"...)
specialised for this arrow:
let
arr_xy = arr $dArrow -- <-- Not in scope!
...
in
arr_xy (\(C x y) { $dArrow = ... } -> ...)
This patch allows arrow operations to be type-checked before the proc
itself, avoiding this issue.
Fix #17423
Diffstat (limited to 'testsuite')
-rw-r--r-- | testsuite/tests/arrows/should_compile/T17423.hs (renamed from testsuite/tests/gadt/T17423.hs) | 0 | ||||
-rw-r--r-- | testsuite/tests/arrows/should_compile/all.T | 1 | ||||
-rw-r--r-- | testsuite/tests/gadt/all.T | 1 |
3 files changed, 1 insertions, 1 deletions
diff --git a/testsuite/tests/gadt/T17423.hs b/testsuite/tests/arrows/should_compile/T17423.hs index 35023f0612..35023f0612 100644 --- a/testsuite/tests/gadt/T17423.hs +++ b/testsuite/tests/arrows/should_compile/T17423.hs diff --git a/testsuite/tests/arrows/should_compile/all.T b/testsuite/tests/arrows/should_compile/all.T index 279dd109dd..b47cea0538 100644 --- a/testsuite/tests/arrows/should_compile/all.T +++ b/testsuite/tests/arrows/should_compile/all.T @@ -16,3 +16,4 @@ test('T5283', normal, compile, ['']) test('T5267', expect_broken(5267), compile, ['']) test('T5022', normalise_fun(normalise_errmsg), compile, ['']) test('T5333', normal, compile, ['']) +test('T17423', normal, compile, ['']) diff --git a/testsuite/tests/gadt/all.T b/testsuite/tests/gadt/all.T index 05ec39f18e..225d8e8650 100644 --- a/testsuite/tests/gadt/all.T +++ b/testsuite/tests/gadt/all.T @@ -119,6 +119,5 @@ test('T14808', normal, compile, ['']) test('T15009', normal, compile, ['']) test('T15558', normal, compile, ['']) test('T16427', normal, compile_fail, ['']) -test('T17423', expect_broken(17423), compile_and_run, ['']) test('T18191', normal, compile_fail, ['']) test('SynDataRec', normal, compile, ['']) |