During presentation of Taste of Roc, we had a nice Tag errors messages.
This when does not cover all the possibilities:
when ...
Other possibilities include:
Err (FileReadErr _)
But trying the file.roc, I can't find how to reproduce it, it looks like we lost this.
The argument is an anonymous function of type:
[Err [FileWriteErr a [PermissionDenied, ...], Ok {}] -> Task ExitCode [] [Read [Env, File]c,
Write [File, Stderr, Stdout]d]e ?
But attempt needs its 2nd argument to be:
Result {} [FileReadErr Path.Path File.ReadErr ...], ->
Task ExitCode [] [Read [Env, File]c, Write [File, Stderr,
Stdout]d]e ?
Is it something known? Or am I expecting something wrong?
Yeah, this is known... we should be doing a lot better here :sweat_smile:
We have some ideas to improve this but they haven't been done yet
Could you file a bug report with this reproduction? It would be a good test case for improving the error message here!
I'm not good at naming issues, do you have a suggestion?
One sec, I'm gonna make a mega-issue to collect these reproductions
much better if it's you! :sweat_smile:
:landing: could you add the reproduction to https://github.com/roc-lang/roc/issues/4314?
the zulip link seems broken in the issue
Oops, it's a private channel. Folks are added to it after they land a couple PRs to the compiler
Last updated: Jul 06 2025 at 12:14 UTC