diff options
author | Ryan Scott <ryan.gl.scott@gmail.com> | 2018-01-26 13:10:26 -0500 |
---|---|---|
committer | Ben Gamari <ben@smart-cactus.org> | 2018-01-26 14:37:29 -0500 |
commit | 59fa7b32b018a91f81773ca676251a0b2761ef56 (patch) | |
tree | 7de1fd6fbc78e43dbae6bba706ab489b69bf27b2 /testsuite/tests/polykinds | |
parent | a55d581f8f2923560c3444253050b13fdf2dec10 (diff) | |
download | haskell-59fa7b32b018a91f81773ca676251a0b2761ef56.tar.gz |
Fix #14719 by using the setting the right SrcSpan
Currently, error messages that germane to GADT constructors
put the source span at only the first character in the constructor,
leading to insufficient caret diagnostics. This can be easily fixed
by using a source span that spans the entire constructor, instead of
just the first character.
Test Plan: make test TEST=T14719
Reviewers: alanz, bgamari, simonpj
Reviewed By: alanz, simonpj
Subscribers: simonpj, goldfire, rwbarton, thomie, carter
GHC Trac Issues: #14719
Differential Revision: https://phabricator.haskell.org/D4344
Diffstat (limited to 'testsuite/tests/polykinds')
-rw-r--r-- | testsuite/tests/polykinds/T9222.stderr | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/testsuite/tests/polykinds/T9222.stderr b/testsuite/tests/polykinds/T9222.stderr index 6e143e0cf9..604cc1b7ec 100644 --- a/testsuite/tests/polykinds/T9222.stderr +++ b/testsuite/tests/polykinds/T9222.stderr @@ -5,12 +5,12 @@ T9222.hs:13:3: error: inside the constraints: a ~ '(b0, c0) bound by the type of the constructor ‘Want’: (a ~ '(b0, c0)) => Proxy b0 - at T9222.hs:13:3 + at T9222.hs:13:3-43 ‘c’ is a rigid type variable bound by the type of the constructor ‘Want’: forall i1 j1 (a :: (i1, j1)) (b :: i1) (c :: j1). ((a ~ '(b, c)) => Proxy b) -> Want a - at T9222.hs:13:3 + at T9222.hs:13:3-43 • In the ambiguity check for ‘Want’ To defer the ambiguity check to use sites, enable AllowAmbiguousTypes In the definition of data constructor ‘Want’ |