Skip to content

Ormolu forcing long lines in function definitions #609

@sellout

Description

@sellout

Describe the bug
In a function definition,

foo bar =
  body

foo bar = is beyond our auto-enforced line length, but Ormolu doesn't let me break it, AFAICT. Every variant I try has Ormolu suggesting foo bar = on a single line.

To Reproduce
Define a function with a single argument, and try to get it to not put everything on one line.

Expected behavior
There should be some way to separate these tokens. My suggestion would be something like

foo
  bar
  = body

I.e., treat = more like an operator.

Environment

  • OS name + version: NixOS 20.03
  • Version of the code: 0.3.1

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions