Skip to content

Conversation

@dolio
Copy link
Contributor

@dolio dolio commented Aug 12, 2025

This adjusts the error message from #5825 to address the situation in in #5722. The latter triggers the same failure in the type checker, but the reason is different. In this case it's just an ability match introducing a type variable that is not allowed to escape the scope, but will as written.

@dolio dolio requested a review from aryairani August 12, 2025 16:33
@aryairani
Copy link
Contributor

Thanks @dolio; could you add a transcript that demos the error message? And then good to go.

Comment on lines 642 to 643
"signature does not specify the abilities used. It may also be from a\n",
"variable introduced by an ability match escaping its scope.",
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

One minor thing. Anytime you're editing error messages, it's a good opportunity to switch away from using hard linebreaks - hard linebreaks result in weird rendering depending on the user's terminal width. It's a bit of longstanding tech debt that the dynamic wrapping is used inconsistently in our error messages.

You can follow other examples in this file which use the pretty-printing library to get it to wrap dynamically based on the width of the terminal, using Pr.wrap, Pr.lines, etc.

I wouldn't necessarily hold up a PR just for this, but it's an example of "leave the code a bit nicer than you found it". :)

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Oh, great. I would have done this to begin with, but for some reason I thought we didn't do auto-wrapping.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

In retrospect, it wasn't that I thought we couldn't do wrapping. It's that I didn't understand how to use the wrapping combinator correctly (just on a single paragraph you want wrapped). So before when I tried to use it, it would crush my message into a single blob.

The message is now properly wrapped.

@dolio
Copy link
Contributor Author

dolio commented Aug 12, 2025

BTW, the transcript from #5825 will have the error message. It's the same error message regardless of how it gets triggered, because I don't think it's easy to tell the two cases apart.

I think that's why the transcripts are failing. I forgot to re-run them and check in the new message.

@dolio
Copy link
Contributor Author

dolio commented Aug 12, 2025

BTW, I have some other transcripts that change locally on rerun, but they don't have anything to do with what I changed here. all-base-hashes.output.md and fix5129.output.md. Is it possible to have changes on some transcripts without CI failing?

Edit: I guess this has been fixed in a newer trunk than I forked from.

@aryairani aryairani merged commit dc1eeb3 into trunk Aug 12, 2025
31 checks passed
@aryairani aryairani deleted the topic/ability-skolem-message branch August 12, 2025 21:03
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants