alanz / ghc-exactprint

GHC version of haskell-src-exts exactPrint
BSD 3-Clause "New" or "Revised" License
70 stars 32 forks source link

Reword/Clarify Delta/addEntryDelta documentation #48

Closed lspitzner closed 7 years ago

lspitzner commented 7 years ago

This is more additional text than I had anticipated, but oh well. I think this captures the status quo a bit more closely, including the special indentation levels at "let" and "if".

A useful way to think of these rules is that the 'DeltaPos' is relative to the further left an expression could have been placed.

This sentence might deserve an update too; as it stands it conflicts somewhat with the fact that negative offsets are possible with the specially introduced indentation levels.

And i guess some more examples would do wonders if we want other people to quickly get the idea, too.