Just when I thought I was getting the hang of Tasks, I have run into an issue that I can't wrap my head around.
Any help in understanding this will be highly appreciated.
Here is the issue in its simplified form:
The following function works fine with this annotation and body
run : Task {} _
run =
Stdout.line! "Say something:"
input = Stdin.line!
Stdout.line! "You said: $(input)"
but the following throws an error
run : Task {} _
run =
Stdout.line! "Say something:"
If I either remove the ! from Stdout.line it works, if I remove the annotation above, it still works but not with both.
I am happy to provide more details if needed but I think I have narrowed it down to the example above. Here's the complete working file
app [main] { pf: platform "https://github.com/roc-lang/basic-cli/releases/download/0.15.0/SlwdbJ-3GR7uBWQo6zlmYWNYOxnvo8r6YABXD-45UOw.tar.br" }
import pf.Stdout
import pf.Stdin
main =
run
run : Task {} _
run =
Stdout.line! "Say something:"
input = Stdin.line!
Stdout.line! "You said: $(input)"
Sounds like a bug in !
Thanks for replying @Brendan Hansknecht
I genuinely hope it's a bug, otherwise I feel I will have to stop the library I am trying to write and go back to square 0 and start the tutorial all over again.
Should I raise the issue on github?
Yes please
Raised here.
Last updated: Jul 05 2025 at 12:14 UTC