Multiline if statements have incorrect indentation
Not sure if this is just a problem with purescript v0.12.5, but the formatting is causing a syntax error due to incorrect indentation
Before formatting:
-- Heres a test function
test :: Int -> Effect String
test x = do
result <- if x == 15
then pure "Hello"
else do
void $ pure $ show "Friends!!"
pure "World"
let r2 = if x == 15 then "15"
else "Wrong"
pure result
Formatted:
-- Heres a test function
test :: Int -> Effect String
test x = do
result <- if x == 15 then
pure "Hello"
else do
void $ pure $ show "Friends!!"
pure "World"
let
r2 = if x == 15 then
"15"
else
"Wrong"
pure result
In both cases, the else is getting indented at the same level as the identifier, which is causing a syntax error.