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

Swap maybe for option CEs #1131

Merged
merged 1 commit into from
Jul 9, 2023
Merged

Conversation

TheAngryByrd
Copy link
Member

@TheAngryByrd TheAngryByrd commented Jul 9, 2023

WHAT

🤖 Generated by Copilot at 44a49a8

This pull request refactors several modules in the FsAutoComplete.Core project to use the FSharpSymbolUse type and the FsToolkit.ErrorHandling library, which simplify the code and improve the error handling logic. It also removes some unused or redundant code, and adds an equality override for the Hash type.

🤖 Generated by Copilot at 44a49a8

Sing, O Muse, of the valiant deeds of the F# coders,
Who refactored their code with skill and wisdom divine,
Replacing asyncMaybe with asyncOption, the solver
Of optional woes, and FSharpSymbolUse, the sublime.

🔄🧹🛠️

WHY

Just delegating to FsToolkit for this stuff now

HOW

🤖 Generated by Copilot at 44a49a8

  • Replaced asyncMaybe computation expression with asyncOption from FsToolkit.ErrorHandling library for more consistent and convenient handling of optional values in async workflows (link, link, link, link, link, link, link, link, link, link, link, link, link, link)
  • Added an override for the Equals method to the Hash type in FileSystem.fs to implement equality comparison for IFSACSourceText values (link)
  • Added an open statement for FsToolkit.ErrorHandling library in UnionPatternMatchCaseGenerator.fs to use the asyncOption computation expression and other utilities for error handling in F# (link)
  • Removed the MaybeBuilder and AsyncMaybeBuilder types and the maybe and asyncMaybe values from the Utils module, and removed the asyncMaybe and maybe values from the String module, as they were replaced by the option and asyncOption values from the FsToolkit.ErrorHandling library (link, link)
  • Removed some empty lines from the ProcessHelper module in Utils.fs and the List module in Utils.fs (link, link)

@baronfel
Copy link
Contributor

baronfel commented Jul 9, 2023

Net negative lines of code!

@baronfel baronfel merged commit 732ccc8 into ionide:main Jul 9, 2023
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.

2 participants