dotnet / dotnet/fsharp

A code refactoring to convert bool to a Yes|No DU

Open
#15,566 3 comments 1 reaction 0 assignees View on GitHub
Area-LangService-CodeRefactorings Feature Request
Dominant language
F#
Stars
4.3k
Forks
876
Avg merge
4d 22h
Merged PRs (30d)
144

Description

Update: actually turns out there are more ideas. See my original idea below and even more original ideas of kerams even more below.

---

Convert
```fsharp
type T = T of bool
```
to
```fsharp
[]
type T =
| Yes
| No
```

A true functional fix :)

_Originally posted by @kerams in https://github.com/dotnet/fsharp/issues/15561#issuecomment-1622448653_

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.