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

One line empty type #37

Open
Shuenhoy opened this issue Feb 6, 2022 · 2 comments
Open

One line empty type #37

Shuenhoy opened this issue Feb 6, 2022 · 2 comments

Comments

@Shuenhoy
Copy link

Shuenhoy commented Feb 6, 2022

This guideline seems not to mention it, but fantomas formats empty type definitions to 3 lines:

type AnEmptyType =
    class
    end

I think this is pretty lengthy and won't be beneficial, since you can never insert anything between this class and end. Can we change it to one line?

type AnEmptyType = class end
@Smaug123
Copy link
Contributor

Smaug123 commented Feb 6, 2022

Seems reasonable to me, but we'd prefer to keep ourselves aligned to Microsoft for things like this that we don't already have a strong opinion on. I suggest you raise a PR to https://github.com/dotnet/docs/blob/421b2ec4d57acf4f66922235731a7185c6f217a0/docs/fsharp/style-guide/formatting.md (or an issue to that repo); we'll adopt whatever is decided on the Microsoft style guide.

@Shuenhoy
Copy link
Author

Shuenhoy commented Feb 7, 2022

Seems reasonable to me, but we'd prefer to keep ourselves aligned to Microsoft for things like this that we don't already have a strong opinion on. I suggest you raise a PR to https://github.com/dotnet/docs/blob/421b2ec4d57acf4f66922235731a7185c6f217a0/docs/fsharp/style-guide/formatting.md (or an issue to that repo); we'll adopt whatever is decided on the Microsoft style guide.

OK, I raise an issue at dotnet/docs#28103

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants