Syntax error with `if` expression in `do`
When encountering an if
expression, the following formatting is used:
★ purty <( echo "module X where foo = if true then 0 else 1" )
module X where
foo = if true then
0
else
1
However the same formatting is used when in a do
block, which is a syntax error:
★ purty <( echo "module X where foo = do if true then 0 else 1" )
module X where
foo = do
if true then
0
else
1
Compile error:
Unable to parse module:
expecting indentation past column 5 or operator