From 90e29ac9562699a75f51024022ca990805486bfe Mon Sep 17 00:00:00 2001 From: cartermp Date: Wed, 26 Aug 2020 11:49:37 -0700 Subject: [PATCH] Updates --- src/fsharp/fsc.fs | 2 +- src/fsharp/service/SemanticClassification.fs | 20 +------------------- src/utils/sformat.fs | 2 +- 3 files changed, 3 insertions(+), 21 deletions(-) diff --git a/src/fsharp/fsc.fs b/src/fsharp/fsc.fs index 1f9dbeea22d..8ad7d631f3f 100644 --- a/src/fsharp/fsc.fs +++ b/src/fsharp/fsc.fs @@ -322,7 +322,7 @@ module InterfaceFileWriter = for (TImplFile (_, _, mexpr, _, _, _)) in declaredImpls do let denv = BuildInitialDisplayEnvForSigFileGeneration tcGlobals writeViaBuffer os (fun os s -> Printf.bprintf os "%s\n\n" s) - (NicePrint.layoutInferredSigOfModuleExpr true { denv with shrinkOverloads = false; printVerboseSignatures = true } infoReader AccessibleFromSomewhere range0 mexpr |> Layout.squashTo 80 |> Layout.showL) + (NicePrint.layoutInferredSigOfModuleExpr true { denv with shrinkOverloads = false; printVerboseSignatures = true } infoReader AccessibleFromSomewhere range0 mexpr |> Display.squashTo 80 |> Layout.showL) if tcConfig.printSignatureFile <> "" then os.Dispose() diff --git a/src/fsharp/service/SemanticClassification.fs b/src/fsharp/service/SemanticClassification.fs index 0399dfe4200..a731aad3c40 100644 --- a/src/fsharp/service/SemanticClassification.fs +++ b/src/fsharp/service/SemanticClassification.fs @@ -163,23 +163,11 @@ module TcResolutionsExtensions = | Item.Value KeywordIntrinsicValue, ItemOccurence.Use, _, _, _, m -> add m SemanticClassificationType.IntrinsicFunction -<<<<<<< HEAD -<<<<<<< HEAD - | (Item.Value vref), _, _, _, _, m when isFunction g vref.Type -> + | (Item.Value vref), _, _, _, _, m when isFunctionTy g vref.Type -> if isDiscard vref.DisplayName then add m SemanticClassificationType.Plaintext elif valRefEq g g.range_op_vref vref || valRefEq g g.range_step_op_vref vref then add m SemanticClassificationType.Operator -======= - | (Item.Value vref), _, _, _, _, m when isFunction g vref.Type && not (vref.IsConstructor) -> -======= - | (Item.Value vref), _, _, _, _, m when isFunctionTy g vref.Type && not (vref.IsConstructor) -> ->>>>>>> 9219aa3c1... Move isFunction and use it in pretty-printing - if isDiscard vref.DisplayName then - () - elif valRefEq g g.range_op_vref vref || valRefEq g g.range_step_op_vref vref then - () ->>>>>>> 168dba511... Color functions in tooltips + consistent operator treatment elif vref.IsPropertyGetterMethod || vref.IsPropertySetterMethod then add m SemanticClassificationType.Property elif vref.IsMember then @@ -250,12 +238,6 @@ module TcResolutionsExtensions = add m SemanticClassificationType.ExtensionMethod else add m SemanticClassificationType.Method -<<<<<<< HEAD -======= - - | (Item.CustomBuilder _ | Item.CustomOperation _), ItemOccurence.Use, _, _, _, m -> - add m SemanticClassificationType.ComputationExpression ->>>>>>> 82291b017... Fix classification for unresolved/impossible-to-construct constructors // Special case measures for struct types | Item.Types(_, TType_app(tyconRef, TType_measure _ :: _) :: _), LegitTypeOccurence, _, _, _, m when isStructTyconRef tyconRef -> diff --git a/src/utils/sformat.fs b/src/utils/sformat.fs index 1d1271b3e4c..969be6243bb 100644 --- a/src/utils/sformat.fs +++ b/src/utils/sformat.fs @@ -144,7 +144,7 @@ module TaggedTextOps = "int32" "int64" "sbyte" - "seq" // seq x when 'x' is a string works, for example + "seq" // 'seq x' when 'x' is a string works, strangely enough "single" "string" "unit"