expect
# Test single space
when parseStr pWhitespace " " is
Ok _ -> Bool.true
Err _ -> Bool.false
expect
# Test multiple spaces
when parseStr pWhitespace " " is
Ok _ -> Bool.true
Err _ -> Bool.false
I'm trying to see if that's what's causing a compiler crash, so I comment it out (Cmd+/), then save (Cmd+S).
This triggers the auto-format via the Roc language plugin (in Zed), which formats it to this:
# expect
# # Test single space
# when parseStr pWhitespace " " is
# Ok _ -> Bool.true
# Err _ -> Bool.false
# expect
# # Test multiple spaces
# when parseStr pWhitespace " " is
# Ok _ -> Bool.true
# Err _ -> Bool.false
(notice it's inserted space in front of each expect!)
Then, I determine that's not the code at fault, so I uncomment, which doesn't remove the leading space in front of each expect.
This predictably leads to a variety of parsing errors due to invalid indentation, which I need to manually fix up by removing spaces.
It's not obvious to me which part of this process is at fault; they all seem to be doing their jobs. Just the aggregate result is a bit unfortunate.
I have the following code:
I'm trying to see if that's what's causing a compiler crash, so I comment it out (Cmd+/), then save (Cmd+S).
This triggers the auto-format via the Roc language plugin (in Zed), which formats it to this:
(notice it's inserted space in front of each
expect
!)Then, I determine that's not the code at fault, so I uncomment, which doesn't remove the leading space in front of each
expect
.This predictably leads to a variety of parsing errors due to invalid indentation, which I need to manually fix up by removing spaces.
It's not obvious to me which part of this process is at fault; they all seem to be doing their jobs. Just the aggregate result is a bit unfortunate.