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

Put long return types on the next line of SynModuleSigDecl.Val #1184

Merged
merged 1 commit into from
Oct 2, 2020

Conversation

nojaf
Copy link
Contributor

@nojaf nojaf commented Oct 2, 2020

Fixes #1181.

Maybe not the fix that was proposed, but this has the least impact.
Is this somewhat acceptable @Smaug123?

@nojaf nojaf requested a review from Smaug123 October 2, 2020 14:08
Copy link
Contributor

@Smaug123 Smaug123 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This looks reasonable, but what happens if the line is very very long? Does it keep just marching off to the right?

@nojaf
Copy link
Contributor Author

nojaf commented Oct 2, 2020

If it goes even longer it will split on ->, but right now there is a recursive function that does this.
So it is somewhat trickier to say split each -> part on a newline.

In theory, you could have something like:

        val domainOf<'domain1, 'domain2, 'range1, 'range2> :
            Teq<'domain1 -> 'range1, 'domain2 -> 'range2> -> Teq<'domain1, 'domain2>
            -> nextLongThingImagineLikeReallyLong
            -> shortA -> shortB

Of course in an ideal situation, you want all of these underneath each other.
Yet I would only like to implement this when a concrete production sample pops up.
I think this is all a bit less common.

@nojaf nojaf merged commit 31305c2 into fsprojects:master Oct 2, 2020
@nojaf nojaf deleted the fix-1181 branch October 2, 2020 17:07
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 this pull request may close these issues.

Format entire return type on the line
2 participants