haskell-issues icon indicating copy to clipboard operation
haskell-issues copied to clipboard

Language extension: Parenthesize every indentation level

Open Gurkenglas opened this issue 8 years ago • 0 comments

This would desugar

f = g
  h x
  i
    j k

to

f = g
  (h x)
  (i
    (j k))

and in particular it would desugar

foo = asd . evalState
  do dsa
     sda

to

foo = asd . evalState
  (do dsa
      sda)

(The solution is suboptimal because I either need an extra line only for the "do" or to start the do block on "do"'s line, but this is pretty neat in any case.)

Gurkenglas avatar Apr 03 '16 08:04 Gurkenglas