summaryrefslogtreecommitdiff
path: root/testsuite/tests/perf
diff options
context:
space:
mode:
authorMatthew Pickering <matthewtpickering@gmail.com>2022-12-22 10:59:16 +0000
committerMarge Bot <ben+marge-bot@smart-cactus.org>2022-12-24 00:42:51 -0500
commit6d62f6bfbb5a86131e7cbc30993f3fa510d8b3ab (patch)
treee888f791533511ce762e8768ba4790772c3b7ce7 /testsuite/tests/perf
parentf42ba88fd32f1def7dcf02f0a2227b453bf5971c (diff)
downloadhaskell-6d62f6bfbb5a86131e7cbc30993f3fa510d8b3ab.tar.gz
Store RdrName rather than OccName in Holes
In #20472 it was pointed out that you couldn't defer out of scope but the implementation collapsed a RdrName into an OccName to stuff it into a Hole. This leads to the error message for a deferred qualified name dropping the qualification which affects the quality of the error message. This commit adds a bit more structure to a hole, so a hole can replace a RdrName without losing information about what that RdrName was. This is important when printing error messages. I also added a test which checks the Template Haskell deferral of out of scope qualified names works properly. Fixes #22130
Diffstat (limited to 'testsuite/tests/perf')
-rw-r--r--testsuite/tests/perf/compiler/hard_hole_fits.stderr2
1 files changed, 1 insertions, 1 deletions
diff --git a/testsuite/tests/perf/compiler/hard_hole_fits.stderr b/testsuite/tests/perf/compiler/hard_hole_fits.stderr
index fcdde2ee2d..9d4e926892 100644
--- a/testsuite/tests/perf/compiler/hard_hole_fits.stderr
+++ b/testsuite/tests/perf/compiler/hard_hole_fits.stderr
@@ -22,7 +22,7 @@ hard_hole_fits.hs:15:32: warning: [GHC-88464] [-Wtyped-holes (in -Wdefault)]
• Found hole: _ :: Int
• In an equation for ‘testMe’: testMe (HsUnboundVar xuv uv) = _
• Relevant bindings include
- uv :: GHC.Types.Name.Occurrence.OccName
+ uv :: GHC.Types.Name.Reader.RdrName
(bound at hard_hole_fits.hs:15:26)
xuv :: Language.Haskell.Syntax.Extension.XUnboundVar GhcPs
(bound at hard_hole_fits.hs:15:22)