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

Always place bar in front of discriminated union #1750

Closed
4 of 6 tasks
nojaf opened this issue May 24, 2021 · 0 comments · Fixed by #1751
Closed
4 of 6 tasks

Always place bar in front of discriminated union #1750

nojaf opened this issue May 24, 2021 · 0 comments · Fixed by #1751

Comments

@nojaf
Copy link
Contributor

nojaf commented May 24, 2021

I propose we add a setting to always put | before a discriminated union declaration.

The existing way of Fantomas deals with this problem is not conform to the GR style guide.
The bar gets omitted in certain scenarios. These are also, at the time of writing, not conform to what the MS style guide says.

Proposed setting name: fsharp_keep_bar_before_discriminated_union_declaration, default false.

Pros and Cons

The advantages of making this adjustment to Fantomas are correctly implementing two style guides.

The disadvantages of making this adjustment to Fantomas are one extra setting to maintain.

Examples

type A = | A of int

Extra information

Estimated cost (XS, S, M, L, XL, XXL): XS / S

Related suggestions: (put links to related suggestions here)

Affidavit (please submit!)

Please tick this by placing a cross in the box:

Please tick all that apply:

//cc @Smaug123

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

Successfully merging a pull request may close this issue.

1 participant