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

keyword before type declaration leads to invalid F# code #830

Closed
nojaf opened this issue May 15, 2020 · 0 comments · Fixed by #831
Closed

keyword before type declaration leads to invalid F# code #830

nojaf opened this issue May 15, 2020 · 0 comments · Fixed by #831

Comments

@nojaf
Copy link
Contributor

nojaf commented May 15, 2020

Issue created from fantomas-online

Found @Smaug123, the record should be further indented than the internal keyword.
Question is also why this didn't fit on one line?
Might be because it is a signature file.

Code

namespace Bar
type 'a Baz =
    internal {
        Value : 'a
    }

Error

Fantomas was able to format the code but the result appears to be invalid F# code.
Please open an issue.

Formatted result:

namespace Bar

type 'a Baz =
    internal
    { Value: 'a }

Options

Fantomas Next - 4.0.0-alpha-001-1/1/1990

Name Value
IndentSpaceNum 4
PageWidth 120
SemicolonAtEndOfLine false
SpaceBeforeParameter true
SpaceBeforeLowercaseInvocation true
SpaceBeforeUppercaseInvocation false
SpaceBeforeClassConstructor false
SpaceBeforeMember false
SpaceBeforeColon false
SpaceAfterComma true
SpaceBeforeSemicolon false
SpaceAfterSemicolon true
IndentOnTryWith false
SpaceAroundDelimiter true
MaxIfThenElseShortWidth 40
MaxInfixOperatorExpression 50
MaxRecordWidth 40
MaxArrayOrListWidth 40
MaxLetBindingWidth 40
MultilineBlockBracketsOnSameColumn false
NewlineBetweenTypeDefinitionAndMembers false
StrictMode false
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

Successfully merging a pull request may close this issue.

1 participant