some of us talked about this idea at Software You Can Love in Milan: we could allow running tasks in roc repl
for example, you could write at the prompt:
» File.writeUtf8! path contents
...and it would do that
the rule would be that you'd have to actually use the ! suffix to indicate that you really want to run the effect
and we'd infer the platform based on the main.roc application (or platform) in the current dir where you launched the repl
(configurable via cli arg)
Intriguing. How would we ensure effects only run once and deal with linking? I think the current repl just builds up one long file and runs everything
Yeah, I was thinking about that on the plane. We would somehow have to replace the def’s expression with the result, but I don’t think we can really do that. It could include pointers that won’t work on the next run.
The idea is really good and I like it. Would packages defined in main be allowed just like how the platform is infered?
Yeah, we should do that separately. That doesn’t require any major changes to the repl.
Last updated: Jun 16 2026 at 16:19 UTC