Skip to content

Commit fa3739a

Browse files
committed
chore(Util): drop curry, uncurry
1 parent 1d185e6 commit fa3739a

File tree

3 files changed

+6
-6
lines changed

3 files changed

+6
-6
lines changed

src/CSharpLanguageServer/Handlers/Implementation.fs

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,10 @@ module Implementation =
2626
SymbolFinder.FindImplementationsAsync(sym, sln, cancellationToken = ct)
2727
|> Async.AwaitTask
2828

29-
let! locations = impls |> Seq.map (fun i -> context.ResolveSymbolLocations i None) |> Async.Parallel
29+
let! locations =
30+
impls
31+
|> Seq.map (fun i -> context.ResolveSymbolLocations i None)
32+
|> Async.Parallel
3033

3134
return locations |> Array.collect List.toArray |> Declaration.C2 |> U2.C1 |> Some
3235
}

src/CSharpLanguageServer/Handlers/SignatureHelp.fs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,7 @@ module SignatureHelp =
4545

4646
// Algorithm from omnisharp-roslyn (https://github.com/OmniSharp/omnisharp-roslyn/blob/2d582b05839dbd23baf6e78fa2279163723a824c/src/OmniSharp.Roslyn.CSharp/Services/Signatures/SignatureHelpService.cs#L139C1-L166C10)
4747
let private methodScore (types: TypeInfo list) (m: IMethodSymbol) =
48-
let score (invocation: TypeInfo) (definition: IParameterSymbol) =
48+
let score (invocation: TypeInfo, definition: IParameterSymbol) =
4949
if isNull invocation.ConvertedType then
5050
1
5151
else if SymbolEqualityComparer.Default.Equals(invocation.ConvertedType, definition.Type) then
@@ -56,7 +56,7 @@ module SignatureHelp =
5656
if m.Parameters.Length < types.Length then
5757
Microsoft.FSharp.Core.int.MinValue
5858
else
59-
Seq.zip types m.Parameters |> Seq.map (uncurry score) |> Seq.sum
59+
Seq.zip types m.Parameters |> Seq.map score |> Seq.sum
6060

6161

6262
let provider (_: ClientCapabilities) : SignatureHelpOptions option =

src/CSharpLanguageServer/Util.fs

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -62,9 +62,6 @@ let rec unpackException (exn: Exception) =
6262
| None -> exn
6363
| _ -> exn
6464

65-
let curry f x y = f (x, y)
66-
let uncurry f (x, y) = f x y
67-
6865

6966
let formatInColumns (data: list<list<string>>) : string =
7067
if List.isEmpty data then

0 commit comments

Comments
 (0)