fsharp / fsharp/fslang-design

[style-guide] Treat cast operators :> and :?> as pipe operators

Open
#737 0 comments 7 reactions 0 assignees View on GitHub
Dominant language
F#
Stars
557
Forks
149
Avg merge
4d 13h
Merged PRs (30d)
2

Description

I suggest that the style guide is updated to specify that the cast operators `:>` and `:?>` can be treated as pipelines when formatting.

For example, for a suitable max width, Fantomas currently formats

```f#
MyImpl(arg) :> MyInterface |> MyUnionCase
```

as

```f#
MyImpl(arg) :> MyInterface
|> MyUnionCase
```

whereas I'd suggest

```f#
MyImpl(arg)
:> MyInterface
|> MyUnionCase
```

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.