Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Formatting of anonymous record types does not respect fsharp_multiline_block_brackets_on_same_column #1167

Closed
3 tasks
Fizzixnerd opened this issue Sep 26, 2020 · 2 comments

Comments

@Fizzixnerd
Copy link
Contributor

Issue created from fantomas-online

Code

type A = {| x: int; y: AReallyLongTypeThatIsMuchLongerThan40Characters |}

let f (x: {| x: int; y:  AReallyLongTypeThatIsMuchLongerThan40Characters |}) = x

Result

type A =
    {| x: int
       y: AReallyLongTypeThatIsMuchLongerThan40Characters |}

let f (x: {| x: int
             y: AReallyLongTypeThatIsMuchLongerThan40Characters |}) =
    x

Problem description

Expected something like:

type A =
    {|
        x: int
        y: AReallyLongTypeThatIsMuchLongerThan40Characters
    |}

let f (x: {|
              x: int
              y: AReallyLongTypeThatIsMuchLongerThan40Characters
          |}) =
    x

Note: G-Research style guide doesn't mention anonymous records, or how to format them as types.

Extra information

  • The formatted result breaks by code.
  • The formatted result gives compiler warnings.
  • I or my company would be willing to help fix this.

Options

Fantomas Master at 09/26/2020 16:53:55 - 3a17205

    { config with
                MultilineBlockBracketsOnSameColumn = true }
@nojaf
Copy link
Contributor

nojaf commented Sep 26, 2020

Note: G-Research style guide doesn't mention anonymous records, or how to format them as types.

Please don't hesitate to open an issue for the GR style guide.

@nojaf
Copy link
Contributor

nojaf commented Dec 5, 2022

This is available in the 5.1 series.

@nojaf nojaf closed this as completed Dec 5, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants