As of today's nightly, Task
is now builtin in Roc, you'll need to upgrade to basic-cli 0.15.0 and remove Task
imports like this one:
import pf.Task exposing [Task]
If you encounter:
thread 'main' panicked at crates/compiler/mono/src/borrow.rs:396:34:
internal error: entered unreachable code:
No borrow signature for LambdaName { name: `16.IdentId(46)`, niche: Niche(Captures([InLayout(33), InLayout(149)])) } layout.
Tip: This can happen when you call a function with less arguments than it expects.
Like `Arg.list!` instead of `Arg.list! {}`
note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace
You'll need to change someTime = Utc.now!
to someTime = Utc.now! {}
basic-webserver 0.9.0 has been released as well.
amazing!!! thanks so much to everyone who worked on this! What a massive improvement to the language! :heart_eyes::heart_eyes::heart_eyes:
Oh oh, can't wait to play with it when I get home!
As a casual observer I know this has been in the works for ages and it's awesome to see it come to fruition! It'd be cool to read a super brief write up of the wins/unlocks here. As I understand it there is so much more to it than just "don't need to write an import anymore".
I think it is mostly the base for unlocking more (rather than a huge unlock itself), but im not fully sure, so hopefully others will chime in.
As far as I'm aware, this will unblock Effect Interpreters, which (I believe) in turn allows Roc code to run Tasks in parallel!
One of the main benefits is that Roc libraries now know what a Task
is. If Weaver, for example, wants to provide a method that intelligently manages responding to stdout, it can now ask for a callback that takes a Str
and returns a Task {} *
Sven van Caem said:
As far as I'm aware, this will unblock Effect Interpreters, which (I believe) in turn allows Roc code to run Tasks in parallel!
This is part of the journey, yes, but we still need type erasure to unblock map2
for parallelism. So we are still blocked, but we are making progress!
The thing I've been looking forward to most is the ability to have platform agnostic packages with effects. We can move a lot of code into packages and reuse that.
It's a massive lift for the ecosystem, well unlock... now we get to experiment with it and build a lot of cool things. :sunglasses:
Awesome thanks! Exciting stuff!
Last updated: Jul 26 2025 at 12:14 UTC