Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commita7245c3

Browse files
authored
Use standard options (dotnet#2075)
1 parenta00791b commita7245c3

File tree

1 file changed

+1
-13
lines changed

1 file changed

+1
-13
lines changed

‎vsintegration/src/FSharp.Editor/Common/CommonHelpers.fs‎

Lines changed: 1 addition & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -41,18 +41,6 @@ type internal SymbolLookupKind =
4141
| ByRightColumn
4242
| ByLongIdent
4343

44-
[<RequireQualifiedAccess>]
45-
moduleOption=
46-
/// Gets the value associated with the option or the supplied default value.
47-
let inlinegetOrElse v=function
48-
| Some x-> x| None-> v
49-
50-
/// Gets the option if Some x, otherwise try to get another value
51-
let inlineorTry f=
52-
function
53-
| Some x-> Some x
54-
| None-> f()
55-
5644
moduleinternalCommonHelpers=
5745
typeprivateSourceLineData(lineStart: int,lexStateAtStartOfLine: FSharpTokenizerLexState,lexStateAtEndOfLine: FSharpTokenizerLexState,
5846
hashCode: int, classifiedSpans: IReadOnlyList<ClassifiedSpan>, tokens: FSharpTokenInfo list)=
@@ -318,7 +306,7 @@ module internal CommonHelpers =
318306
| LexerSymbolKind.GenericTypeParameter
319307
| LexerSymbolKind.StaticallyResolvedTypeParameter->true
320308
|_->false)
321-
|> Option.orTry(fun _-> tokensUnderCursor|> List.tryFind(fun{DraftToken.Kind=k}-> k= LexerSymbolKind.Operator))
309+
|> Option.orElseWith(fun _-> tokensUnderCursor|> List.tryFind(fun{DraftToken.Kind=k}-> k= LexerSymbolKind.Operator))
322310
|> Option.map(fun token->
323311
{ Kind= token.Kind
324312
Line= linePos.Line

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp