Skip to content

[style-guide] Lambda closing paren defaults #730

@auduchinok

Description

@auduchinok

There's inconsistency of how closing bracket is placed with default Fantomas settings:

// closing bracket is on the new line
seq {
    //
    return ()
}

// closing bracket is on the expression line
seq (fun _ ->
    //
    ())

// closing bracket is on the new line
someTupledFunction (
    "A very long string making all of this multi-line",
    "A very long string making all of this multi-line"
)

I suggest we could try to move closing bracket in lambdas to a new line, so it's more inline with other similar constructions. It would also make it easier to edit the lambda if the closing bracket was on a new line:

seq (fun _ ->
    //
    ()
)

Moving the closing bracket like this is already supported in Fantomas, but it's not turned on by default.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions