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

Tuple as parameter in long function signatures #14

Open
nojaf opened this issue Dec 19, 2020 · 3 comments · May be fixed by #21
Open

Tuple as parameter in long function signatures #14

nojaf opened this issue Dec 19, 2020 · 3 comments · May be fixed by #21

Comments

@nojaf
Copy link
Contributor

nojaf commented Dec 19, 2020

Reading upon https://github.com/G-Research/fsharp-formatting-conventions#long-function-signatures,
what happens if the parameter is a long tuple?

Example:

module M =
    let LongFunctionWithLotsOfParametersAndReturnType
        (
            aVeryLongParam: AVeryLongTypeThatYouNeedToUse,
            aSecondVeryLongParam: AVeryLongTypeThatYouNeedToUse,
            aThirdVeryLongParam: AVeryLongTypeThatYouNeedToUse
        ) : ReturnType =
        // ... the body of the method follows
        ()

How would this look like?

@Smaug123
Copy link
Contributor

Smaug123 commented Jan 19, 2021

I think this is:

module M =
    let LongFunctionWithLotsOfParametersAndReturnType
        (
            aVeryLongParam: AVeryLongTypeThatYouNeedToUse,
            aSecondVeryLongParam: AVeryLongTypeThatYouNeedToUse,
            aThirdVeryLongParam: AVeryLongTypeThatYouNeedToUse
        )
        : ReturnType
        =
        // ... the body of the method follows
        ()

@nojaf
Copy link
Contributor Author

nojaf commented Jan 20, 2021

Would the equals sign not be on the next line, similar to https://github.com/G-Research/fsharp-formatting-conventions#long-function-signatures?

@Smaug123
Copy link
Contributor

You're quite right. I'll edit that.

Smaug123 added a commit that referenced this issue Mar 21, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
2 participants