diff options
author | Matthew Pickering <matthewtpickering@gmail.com> | 2023-01-03 11:29:49 +0000 |
---|---|---|
committer | Matthew Pickering <matthewtpickering@gmail.com> | 2023-01-05 13:56:38 +0000 |
commit | 8d69ac94e8527768118513112a982d6f0cf147c1 (patch) | |
tree | 14c19bffc091ff8c04affd726cb79b49944eda29 /testsuite/tests/ghci/scripts/T22695.stderr | |
parent | 00dc51060881df81258ba3b3bdf447294618a4de (diff) | |
download | haskell-wip/t22695.tar.gz |
Only store Name in FunRhs rather than Id with knot-tied fieldswip/t22695
All the issues here have been caused by #18758.
The goal of the ticket is to be able to talk about things like
`LTyClDecl GhcTc`. In the case of HsMatchContext,
the correct "context" is whatever we want, and in fact storing just a
`Name` is sufficient and correct context, even if the rest of the AST is
storing typechecker Ids.
So this reverts (#20415, !5579) which intended to get closed to #18758 but
didn't really and introduced a few subtle bugs.
Printing of an error message in #22695 would just hang, because we would
attempt to print the `Id` in debug mode to assertain whether it was
empty or not. Printing the Name is fine for the error message.
Another consequence is that when `-dppr-debug` was enabled the compiler would
hang because the debug printing of the Id would try and print fields
which were not populated yet.
This also led to 32070e6c2e1b4b7c32530a9566fe14543791f9a6 having to add
a workaround for the `checkArgs` function which was probably a very
similar bug to #22695.
Fixes #22695
Diffstat (limited to 'testsuite/tests/ghci/scripts/T22695.stderr')
-rw-r--r-- | testsuite/tests/ghci/scripts/T22695.stderr | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/testsuite/tests/ghci/scripts/T22695.stderr b/testsuite/tests/ghci/scripts/T22695.stderr new file mode 100644 index 0000000000..4fe84d0713 --- /dev/null +++ b/testsuite/tests/ghci/scripts/T22695.stderr @@ -0,0 +1,8 @@ + +<interactive>:1:10: error: + • The constructor ‘Just’ should have 1 argument, but has been given none + • In the pattern: Just + In a stmt of a pattern guard for + an equation for ‘test’: + Just <- x + In an equation for ‘test’: test x | Just <- x = x |