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

Show return type hints on last line of pipeline chain #602

Merged
merged 10 commits into from
May 27, 2024
Merged

Conversation

DedSec256
Copy link
Contributor

@DedSec256 DedSec256 commented Mar 12, 2024

@DedSec256
Copy link
Contributor Author

DedSec256 commented Apr 8, 2024

image
image
image
image

@auduchinok
Copy link
Member

@DedSec256 Please rebase on main.

Copy link
Member

@auduchinok auduchinok left a comment

Choose a reason for hiding this comment

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

Very good testing overall, but I'm a bit lost with the skipFunArgs helper.

Comment on lines +1 to +2
[ 1 ]||(0)
|>
Copy link
Member

Choose a reason for hiding this comment

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

This is a good one!

|> ignore
|> id
Copy link
Member

Choose a reason for hiding this comment

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

👍

|> List.iter ignore

[1]||(8)
|> List.map ignore||(9)
Copy link
Member

Choose a reason for hiding this comment

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

👍

let f _ _ = ()

1||(12)
|> f||(13)
Copy link
Member

Choose a reason for hiding this comment

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

👍

Comment on lines 59 to 61
.IgnoreParentParens()
.GetOutermostParentExpressionFromItsReturn()
.IgnoreParentParens()
Copy link
Member

Choose a reason for hiding this comment

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

I wonder if this parens skipping would be better to be inside GetOutermostParentExpressionFromItsReturn instead of having to do it twice later?

Comment on lines +96 to +93
let rec skipFunArgs (t: FSharpType) =
if t.IsFunctionType then skipFunArgs t.GenericArguments[1] else t
Copy link
Member

Choose a reason for hiding this comment

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

I'm not sure I can easily follow the logic here. Could you add some comments/examples, please?

@auduchinok auduchinok merged commit 43f1864 into main May 27, 2024
@DedSec256 DedSec256 deleted the net242-pipes branch May 27, 2024 19:55
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.

None yet

2 participants