Stream: beginners

Topic: Backpassing indent errors


view this post on Zulip Dan Rubery (Dec 03 2022 at 03:49):

Hello! I'm new to Roc so let me know if this is out of place or something. I'm trying to use backpassing, but consistently get "Indent ends after expression" errors. For example:

I am partway through parsing an expression, but I got stuck here:

29│  f = \x -> y <- Result.try (parse x)
30│            Ok y
                   ^

view this post on Zulip Brendan Hansknecht (Dec 03 2022 at 03:59):

That is interesting to parse. Does something like this work:

f = \x ->
    y <- Result.try (parse x)
    Ok y

view this post on Zulip Brendan Hansknecht (Dec 03 2022 at 03:59):

I assume backpassing needs its own line

view this post on Zulip Dan Rubery (Dec 03 2022 at 04:16):

Ah, that does fix the problem, thanks! "Backpassing needs its own line" definitely seems like the case


Last updated: Jul 05 2025 at 12:14 UTC