TLDR; Windows users, make sure your files aren't being saved with CRLF
line endings
a little embarrassed how long it took me to figure this out :sweat_smile:
tutorial example Hello.roc
wasn't compiling
── UNFINISHED WHEN ──────────────── examples/interactive/cli-platform/Task.roc ─
I was partway through parsing a when expression, but I got stuck here:
13│ when res is
^
I was expecting to see the is keyword next.
Note: Here is an example of a valid when expression for reference.
when List.first plants is
Ok n ->
n
Err _ ->
200
Notice the indentation. All patterns are aligned, and each branch is
indented a bit more than the corresponding pattern. That is important!
re-saved that Task.roc
file with LF
line endings, now it runs :raised_hands:
We should handle this case better, I've made issue #3064 for this.
Last updated: Jul 06 2025 at 12:14 UTC