Skip to content

Respect more newlines? #74

@ruhatch

Description

@ruhatch

This is really a question about how ormolu wants to treat newlines in general. I like to be liberal with whitespace to increase readability. For example I:

  • Add newlines between groups of imports that I want to remain separate
  • Add multiple newlines between sections within a single file
  • Add newlines between expressions in a do block when each is a little complex
  • Add newlines between bindings in a where block

It seems that ormolu will strip most of these out right now and I'm wondering how this should be treated in the future. One of the most interesting features of ormolu, for me at least, is the ability for the programmer to influence the output by, for example, adding line-breaks in type signatures. Newlines seem like another place where we can transfer some control to the programmer.

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions