From ad01ff5f80767d7ecd5dbb7d9520d3c5d88457a3 Mon Sep 17 00:00:00 2001 From: Cristiano Calcagno Date: Fri, 26 May 2023 02:55:05 +0200 Subject: [PATCH] Tests: use the latest beta. --- analysis/tests/package-lock.json | 17 +- analysis/tests/package.json | 2 +- analysis/tests/src/expected/CodeLens.res.txt | 8 +- .../src/expected/CompletePrioritize1.res.txt | 2 +- .../src/expected/CompletePrioritize2.res.txt | 2 +- .../tests/src/expected/Completion.res.txt | 132 ++-- .../expected/CompletionExpressions.res.txt | 621 ++---------------- .../CompletionFunctionArguments.res.txt | 179 +---- .../expected/CompletionInferValues.res.txt | 148 +---- .../tests/src/expected/CompletionJsx.res.txt | 8 +- .../src/expected/CompletionJsxProps.res.txt | 147 +---- .../src/expected/CompletionPipeChain.res.txt | 78 +-- .../expected/CompletionTypeAnnotation.res.txt | 4 +- .../src/expected/CreateInterface.res.txt | 38 +- analysis/tests/src/expected/Div.res.txt | 2 +- analysis/tests/src/expected/Fragment.res.txt | 2 +- analysis/tests/src/expected/Hover.res.txt | 22 +- analysis/tests/src/expected/Jsx2.res.txt | 140 +--- analysis/tests/src/expected/Jsx2.resi.txt | 4 +- analysis/tests/src/expected/JsxV4.res.txt | 22 +- .../tests/src/expected/RecModules.res.txt | 4 +- .../tests/src/expected/SignatureHelp.res.txt | 109 ++- 22 files changed, 297 insertions(+), 1394 deletions(-) diff --git a/analysis/tests/package-lock.json b/analysis/tests/package-lock.json index c1d438a87..71841fe51 100644 --- a/analysis/tests/package-lock.json +++ b/analysis/tests/package-lock.json @@ -5,7 +5,7 @@ "packages": { "": { "dependencies": { - "rescript": "^11.0.0-alpha.1" + "rescript": "^11.0.0-beta.1" }, "devDependencies": { "@rescript/react": "^0.11.0-rc.3" @@ -69,14 +69,17 @@ } }, "node_modules/rescript": { - "version": "11.0.0-alpha.1", - "resolved": "https://registry.npmjs.org/rescript/-/rescript-11.0.0-alpha.1.tgz", - "integrity": "sha512-+01rdTX9FCOZrEJFVrk2XRgrIlGLf93EKsNwoW5iq0jQiKcYGCdHeSbJvVYF+cximgm+CmWhSkR42l+Il6t12A==", + "version": "11.0.0-beta.1", + "resolved": "https://registry.npmjs.org/rescript/-/rescript-11.0.0-beta.1.tgz", + "integrity": "sha512-oKgMJAj/hLQFdWcp3hDcRsTJ/HaVdX5Ze41Egj9XUCBzKP89026e/I3eV4N3+OvLPskvvFwiTEVeR3yiDGVTYA==", "hasInstallScript": true, "bin": { "bsc": "bsc", "bstracing": "lib/bstracing", "rescript": "rescript" + }, + "engines": { + "node": ">=10" } }, "node_modules/scheduler": { @@ -137,9 +140,9 @@ } }, "rescript": { - "version": "11.0.0-alpha.1", - "resolved": "https://registry.npmjs.org/rescript/-/rescript-11.0.0-alpha.1.tgz", - "integrity": "sha512-+01rdTX9FCOZrEJFVrk2XRgrIlGLf93EKsNwoW5iq0jQiKcYGCdHeSbJvVYF+cximgm+CmWhSkR42l+Il6t12A==" + "version": "11.0.0-beta.1", + "resolved": "https://registry.npmjs.org/rescript/-/rescript-11.0.0-beta.1.tgz", + "integrity": "sha512-oKgMJAj/hLQFdWcp3hDcRsTJ/HaVdX5Ze41Egj9XUCBzKP89026e/I3eV4N3+OvLPskvvFwiTEVeR3yiDGVTYA==" }, "scheduler": { "version": "0.23.0", diff --git a/analysis/tests/package.json b/analysis/tests/package.json index cb1651891..c22c6e692 100644 --- a/analysis/tests/package.json +++ b/analysis/tests/package.json @@ -8,6 +8,6 @@ "@rescript/react": "^0.11.0-rc.3" }, "dependencies": { - "rescript": "^11.0.0-alpha.1" + "rescript": "^11.0.0-beta.1" } } diff --git a/analysis/tests/src/expected/CodeLens.res.txt b/analysis/tests/src/expected/CodeLens.res.txt index 06472d5e4..94b96b6e7 100644 --- a/analysis/tests/src/expected/CodeLens.res.txt +++ b/analysis/tests/src/expected/CodeLens.res.txt @@ -1,15 +1,15 @@ Code Lens src/CodeLens.res [{ "range": {"start": {"line": 9, "character": 4}, "end": {"line": 9, "character": 8}}, - "command": {"title": "{\"name\": string} => React.element", "command": ""} + "command": {"title": "(. {\"name\": string}) => React.element", "command": ""} }, { "range": {"start": {"line": 4, "character": 4}, "end": {"line": 4, "character": 6}}, - "command": {"title": "(~opt1: int=?, ~a: int, ~b: int, unit, ~opt2: int=?, unit, ~c: int) => int", "command": ""} + "command": {"title": "(. ~opt1: int=?, ~a: int, ~b: int, unit, ~opt2: int=?, unit, ~c: int) => int", "command": ""} }, { "range": {"start": {"line": 2, "character": 4}, "end": {"line": 2, "character": 7}}, - "command": {"title": "(~age: int, ~name: string) => string", "command": ""} + "command": {"title": "(. ~age: int, ~name: string) => string", "command": ""} }, { "range": {"start": {"line": 0, "character": 4}, "end": {"line": 0, "character": 7}}, - "command": {"title": "(int, int) => int", "command": ""} + "command": {"title": "(. int, int) => int", "command": ""} }] diff --git a/analysis/tests/src/expected/CompletePrioritize1.res.txt b/analysis/tests/src/expected/CompletePrioritize1.res.txt index b520a84a2..85edc9077 100644 --- a/analysis/tests/src/expected/CompletePrioritize1.res.txt +++ b/analysis/tests/src/expected/CompletePrioritize1.res.txt @@ -14,7 +14,7 @@ Path Test. "label": "Test.add", "kind": 12, "tags": [], - "detail": "float => float", + "detail": "(. float) => float", "documentation": null }] diff --git a/analysis/tests/src/expected/CompletePrioritize2.res.txt b/analysis/tests/src/expected/CompletePrioritize2.res.txt index a1ecd61c8..33a943135 100644 --- a/analysis/tests/src/expected/CompletePrioritize2.res.txt +++ b/analysis/tests/src/expected/CompletePrioritize2.res.txt @@ -14,7 +14,7 @@ Path Test. "label": "Test.add", "kind": 12, "tags": [], - "detail": "t => int", + "detail": "(. t) => int", "documentation": null }] diff --git a/analysis/tests/src/expected/Completion.res.txt b/analysis/tests/src/expected/Completion.res.txt index 560385753..da4aa95f4 100644 --- a/analysis/tests/src/expected/Completion.res.txt +++ b/analysis/tests/src/expected/Completion.res.txt @@ -370,7 +370,7 @@ Path Dep.c "label": "customDouble", "kind": 12, "tags": [1], - "detail": "int => int", + "detail": "(. int) => int", "documentation": {"kind": "markdown", "value": "Deprecated: Use customDouble instead\n\nSome doc comment"} }] @@ -382,20 +382,8 @@ Package opens Pervasives.JsxModules.place holder Resolved opens 1 pervasives ContextPath Value[Lib, foo] Path Lib.foo -Found type for function (~age: int, ~name: string) => string -[{ - "label": "age", - "kind": 4, - "tags": [], - "detail": "int", - "documentation": null - }, { - "label": "name", - "kind": 4, - "tags": [], - "detail": "string", - "documentation": null - }] +Found type for function (. ~age: int, ~name: string) => string +[] Complete src/Completion.res 26:13 posCursor:[26:13] posNoWhite:[26:12] Found expr:[26:3->26:13] @@ -479,13 +467,13 @@ Path ForAuto. "label": "ForAuto.abc", "kind": 12, "tags": [], - "detail": "(t, int) => t", + "detail": "(. t, int) => t", "documentation": null }, { "label": "ForAuto.abd", "kind": 12, "tags": [], - "detail": "(t, int) => t", + "detail": "(. t, int) => t", "documentation": null }] @@ -535,13 +523,7 @@ Completable: Cjsx([O, Comp], z, [z]) Package opens Pervasives.JsxModules.place holder Resolved opens 1 pervasives Path O.Comp.make -[{ - "label": "zoo", - "kind": 4, - "tags": [], - "detail": "option", - "documentation": null - }] +[] Complete src/Completion.res 65:8 Attribute id:reac:[65:3->65:8] label:reac @@ -579,14 +561,8 @@ Package opens Pervasives.JsxModules.place holder Resolved opens 1 pervasives ContextPath Value[Lib, foo] Path Lib.foo -Found type for function (~age: int, ~name: string) => string -[{ - "label": "age", - "kind": 4, - "tags": [], - "detail": "int", - "documentation": null - }] +Found type for function (. ~age: int, ~name: string) => string +[] Complete src/Completion.res 74:26 posCursor:[74:26] posNoWhite:[74:25] Found expr:[74:11->74:26] @@ -596,14 +572,8 @@ Package opens Pervasives.JsxModules.place holder Resolved opens 1 pervasives ContextPath Value[Lib, foo] Path Lib.foo -Found type for function (~age: int, ~name: string) => string -[{ - "label": "name", - "kind": 4, - "tags": [], - "detail": "string", - "documentation": null - }] +Found type for function (. ~age: int, ~name: string) => string +[] Complete src/Completion.res 77:32 posCursor:[77:32] posNoWhite:[77:31] Found expr:[77:11->77:32] @@ -613,14 +583,8 @@ Package opens Pervasives.JsxModules.place holder Resolved opens 1 pervasives ContextPath Value[Lib, foo] Path Lib.foo -Found type for function (~age: int, ~name: string) => string -[{ - "label": "name", - "kind": 4, - "tags": [], - "detail": "string", - "documentation": null - }] +Found type for function (. ~age: int, ~name: string) => string +[] Complete src/Completion.res 82:5 posCursor:[82:5] posNoWhite:[82:4] Found expr:[80:8->86:1] @@ -630,7 +594,7 @@ Package opens Pervasives.JsxModules.place holder Resolved opens 1 pervasives ContextPath Value[Lib, foo] Path Lib.foo -Found type for function (~age: int, ~name: string) => string +Found type for function (. ~age: int, ~name: string) => string [] Complete src/Completion.res 90:13 @@ -777,7 +741,7 @@ Path my "label": "myAmazingFunction", "kind": 12, "tags": [], - "detail": "(int, int) => int", + "detail": "(. int, int) => int", "documentation": null }] @@ -918,13 +882,13 @@ Path Js.n "label": "nullable", "kind": 22, "tags": [], - "detail": "type nullable<+'a>", - "documentation": {"kind": "markdown", "value": "\n A value of this type can be undefined, null or 'a. This type is equivalent to Js.Null_undefined.t.\n"} + "detail": "type nullable<'a> = Value('a) | Null | Undefined", + "documentation": null }, { "label": "null", "kind": 22, "tags": [], - "detail": "type null<+'a>", + "detail": "type null<'a> = Value('a) | Null", "documentation": {"kind": "markdown", "value": "\n Nullable value of this type can be either null or 'a. This type is equivalent to Js.Null.t.\n"} }] @@ -1103,13 +1067,13 @@ Path ForAuto. "label": "ForAuto.abc", "kind": 12, "tags": [], - "detail": "(t, int) => t", + "detail": "(. t, int) => t", "documentation": null }, { "label": "ForAuto.abd", "kind": 12, "tags": [], - "detail": "(t, int) => t", + "detail": "(. t, int) => t", "documentation": null }] @@ -1127,13 +1091,13 @@ Path ForAuto.a "label": "abc", "kind": 12, "tags": [], - "detail": "(t, int) => t", + "detail": "(. t, int) => t", "documentation": null }, { "label": "abd", "kind": 12, "tags": [], - "detail": "(t, int) => t", + "detail": "(. t, int) => t", "documentation": null }] @@ -1335,14 +1299,8 @@ Resolved opens 3 Completion.res Completion.res pervasives ContextPath Value[funRecord].someFun ContextPath Value[funRecord] Path funRecord -Found type for function (~name: string) => unit -[{ - "label": "name", - "kind": 4, - "tags": [], - "detail": "string", - "documentation": null - }] +Found type for function (. ~name: string) => unit +[] Complete src/Completion.res 296:11 posCursor:[296:11] posNoWhite:[296:10] Found expr:[296:3->296:11] @@ -1572,20 +1530,8 @@ Package opens Pervasives.JsxModules.place holder Resolved opens 3 Completion.res Completion.res pervasives ContextPath Value[withCallback] Path withCallback -Found type for function (~b: int) => callback -[{ - "label": "b", - "kind": 4, - "tags": [], - "detail": "int", - "documentation": null - }, { - "label": "a", - "kind": 4, - "tags": [], - "detail": "int", - "documentation": null - }] +Found type for function (. ~b: int) => callback +[] Complete src/Completion.res 326:21 posCursor:[326:21] posNoWhite:[326:20] Found expr:[326:3->326:21] @@ -1597,14 +1543,8 @@ Resolved opens 3 Completion.res Completion.res pervasives ContextPath Value[withCallback](~a) ContextPath Value[withCallback] Path withCallback -Found type for function (~b: int) => int -[{ - "label": "b", - "kind": 4, - "tags": [], - "detail": "int", - "documentation": null - }] +Found type for function int +[] Complete src/Completion.res 329:21 posCursor:[329:21] posNoWhite:[329:20] Found expr:[329:3->329:21] @@ -1713,7 +1653,7 @@ Package opens Pervasives.JsxModules.place holder Resolved opens 3 Completion.res Completion.res pervasives ContextPath Value[ff] Path ff -Found type for function ( +Found type for function (. ~opt1: int=?, ~a: int, ~b: int, @@ -1722,7 +1662,7 @@ Found type for function ( unit, ~c: int, ) => int -{"contents": {"kind": "markdown", "value": "```rescript\noption\n```"}} +null Complete src/Completion.res 355:23 posCursor:[355:23] posNoWhite:[355:22] Found expr:[0:-1->355:23] @@ -1808,13 +1748,13 @@ Path ForAuto. "label": "abc", "kind": 12, "tags": [], - "detail": "(t, int) => t", + "detail": "(. t, int) => t", "documentation": null }, { "label": "abd", "kind": 12, "tags": [], - "detail": "(t, int) => t", + "detail": "(. t, int) => t", "documentation": null }] @@ -1864,13 +1804,13 @@ Path funRecord "label": "someFun", "kind": 5, "tags": [], - "detail": "someFun: (~name: string) => unit\n\ntype funRecord = {\n someFun: (~name: string) => unit,\n stuff: string,\n}", + "detail": "someFun: (. ~name: string) => unit\n\ntype funRecord = {\n someFun: (. ~name: string) => unit,\n stuff: string,\n}", "documentation": null }, { "label": "stuff", "kind": 5, "tags": [], - "detail": "stuff: string\n\ntype funRecord = {\n someFun: (~name: string) => unit,\n stuff: string,\n}", + "detail": "stuff: string\n\ntype funRecord = {\n someFun: (. ~name: string) => unit,\n stuff: string,\n}", "documentation": null }] @@ -1967,7 +1907,7 @@ Path r "label": "retAA", "kind": 12, "tags": [], - "detail": "unit => aa", + "detail": "(. unit) => aa", "documentation": null }, { "label": "r", @@ -2087,7 +2027,9 @@ Resolved opens 3 Completion.res Completion.res pervasives ContextPath Value[ok]->g ContextPath Value[ok] Path ok -CPPipe env:Completion +CPPipe env:PervasivesU envFromCompletionItem:Completion +CPPipe type path:Belt.Result.t +CPPipe pathFromEnv:Belt.Result found:false Path Belt.Result.g [{ "label": "Belt.Result.getExn", diff --git a/analysis/tests/src/expected/CompletionExpressions.res.txt b/analysis/tests/src/expected/CompletionExpressions.res.txt index 2be6098fd..acda9788b 100644 --- a/analysis/tests/src/expected/CompletionExpressions.res.txt +++ b/analysis/tests/src/expected/CompletionExpressions.res.txt @@ -27,43 +27,7 @@ Resolved opens 1 pervasives ContextPath CArgument Value[fnTakingRecord]($0) ContextPath Value[fnTakingRecord] Path fnTakingRecord -[{ - "label": "age", - "kind": 5, - "tags": [], - "detail": "age: int\n\nsomeRecord", - "documentation": null - }, { - "label": "offline", - "kind": 5, - "tags": [], - "detail": "offline: bool\n\nsomeRecord", - "documentation": null - }, { - "label": "online", - "kind": 5, - "tags": [], - "detail": "online: option\n\nsomeRecord", - "documentation": null - }, { - "label": "variant", - "kind": 5, - "tags": [], - "detail": "variant: someVariant\n\nsomeRecord", - "documentation": null - }, { - "label": "polyvariant", - "kind": 5, - "tags": [], - "detail": "polyvariant: somePolyVariant\n\nsomeRecord", - "documentation": null - }, { - "label": "nested", - "kind": 5, - "tags": [], - "detail": "nested: option\n\nsomeRecord", - "documentation": null - }] +[] Complete src/CompletionExpressions.res 29:28 posCursor:[29:28] posNoWhite:[29:27] Found expr:[29:11->29:30] @@ -74,13 +38,7 @@ Resolved opens 1 pervasives ContextPath CArgument Value[fnTakingRecord]($0) ContextPath Value[fnTakingRecord] Path fnTakingRecord -[{ - "label": "nested", - "kind": 5, - "tags": [], - "detail": "nested: option\n\nsomeRecord", - "documentation": null - }] +[] Complete src/CompletionExpressions.res 32:35 posCursor:[32:35] posNoWhite:[32:34] Found expr:[32:11->32:38] @@ -91,19 +49,7 @@ Resolved opens 1 pervasives ContextPath CArgument Value[fnTakingRecord]($0) ContextPath Value[fnTakingRecord] Path fnTakingRecord -[{ - "label": "true", - "kind": 4, - "tags": [], - "detail": "bool", - "documentation": null - }, { - "label": "false", - "kind": 4, - "tags": [], - "detail": "bool", - "documentation": null - }] +[] Complete src/CompletionExpressions.res 35:36 posCursor:[35:36] posNoWhite:[35:35] Found expr:[35:11->35:39] @@ -114,37 +60,7 @@ Resolved opens 1 pervasives ContextPath CArgument Value[fnTakingRecord]($0) ContextPath Value[fnTakingRecord] Path fnTakingRecord -[{ - "label": "offline", - "kind": 5, - "tags": [], - "detail": "offline: bool\n\nsomeRecord", - "documentation": null - }, { - "label": "online", - "kind": 5, - "tags": [], - "detail": "online: option\n\nsomeRecord", - "documentation": null - }, { - "label": "variant", - "kind": 5, - "tags": [], - "detail": "variant: someVariant\n\nsomeRecord", - "documentation": null - }, { - "label": "polyvariant", - "kind": 5, - "tags": [], - "detail": "polyvariant: somePolyVariant\n\nsomeRecord", - "documentation": null - }, { - "label": "nested", - "kind": 5, - "tags": [], - "detail": "nested: option\n\nsomeRecord", - "documentation": null - }] +[] Complete src/CompletionExpressions.res 38:37 posCursor:[38:37] posNoWhite:[38:35] Found expr:[38:11->38:53] @@ -155,31 +71,7 @@ Resolved opens 1 pervasives ContextPath CArgument Value[fnTakingRecord]($0) ContextPath Value[fnTakingRecord] Path fnTakingRecord -[{ - "label": "online", - "kind": 5, - "tags": [], - "detail": "online: option\n\nsomeRecord", - "documentation": null - }, { - "label": "variant", - "kind": 5, - "tags": [], - "detail": "variant: someVariant\n\nsomeRecord", - "documentation": null - }, { - "label": "polyvariant", - "kind": 5, - "tags": [], - "detail": "polyvariant: somePolyVariant\n\nsomeRecord", - "documentation": null - }, { - "label": "nested", - "kind": 5, - "tags": [], - "detail": "nested: option\n\nsomeRecord", - "documentation": null - }] +[] Complete src/CompletionExpressions.res 41:44 posCursor:[41:44] posNoWhite:[41:43] Found expr:[41:11->41:47] @@ -190,37 +82,7 @@ Resolved opens 1 pervasives ContextPath CArgument Value[fnTakingRecord]($0) ContextPath Value[fnTakingRecord] Path fnTakingRecord -[{ - "label": "Some(nested)", - "kind": 12, - "tags": [], - "detail": "otherRecord", - "documentation": null, - "insertText": "Some(${1:nested})", - "insertTextFormat": 2 - }, { - "label": "Some(_)", - "kind": 12, - "tags": [], - "detail": "otherRecord", - "documentation": null, - "insertText": "Some(${1:_})", - "insertTextFormat": 2 - }, { - "label": "None", - "kind": 12, - "tags": [], - "detail": "otherRecord", - "documentation": null - }, { - "label": "Some({})", - "kind": 12, - "tags": [], - "detail": "otherRecord", - "documentation": null, - "insertText": "Some({$0})", - "insertTextFormat": 2 - }] +[] Complete src/CompletionExpressions.res 44:46 posCursor:[44:46] posNoWhite:[44:45] Found expr:[44:11->44:49] @@ -242,19 +104,7 @@ Resolved opens 1 pervasives ContextPath CArgument Value[fnTakingRecord]($0) ContextPath Value[fnTakingRecord] Path fnTakingRecord -[{ - "label": "someField", - "kind": 5, - "tags": [], - "detail": "someField: int\n\notherRecord", - "documentation": null - }, { - "label": "otherField", - "kind": 5, - "tags": [], - "detail": "otherField: string\n\notherRecord", - "documentation": null - }] +[] Complete src/CompletionExpressions.res 50:45 posCursor:[50:45] posNoWhite:[50:44] Found expr:[50:11->50:48] @@ -265,31 +115,7 @@ Resolved opens 1 pervasives ContextPath CArgument Value[fnTakingRecord]($0) ContextPath Value[fnTakingRecord] Path fnTakingRecord -[{ - "label": "One", - "kind": 4, - "tags": [], - "detail": "One\n\ntype someVariant = One | Two | Three(int, string)", - "documentation": null, - "insertText": "One", - "insertTextFormat": 2 - }, { - "label": "Two", - "kind": 4, - "tags": [], - "detail": "Two\n\ntype someVariant = One | Two | Three(int, string)", - "documentation": null, - "insertText": "Two", - "insertTextFormat": 2 - }, { - "label": "Three(_, _)", - "kind": 4, - "tags": [], - "detail": "Three(int, string)\n\ntype someVariant = One | Two | Three(int, string)", - "documentation": null, - "insertText": "Three(${1:_}, ${2:_})", - "insertTextFormat": 2 - }] +[] Complete src/CompletionExpressions.res 53:47 posCursor:[53:47] posNoWhite:[53:46] Found expr:[53:11->53:50] @@ -301,13 +127,17 @@ ContextPath CArgument Value[fnTakingRecord]($0) ContextPath Value[fnTakingRecord] Path fnTakingRecord [{ - "label": "One", - "kind": 4, + "label": "Obj", + "kind": 9, "tags": [], - "detail": "One\n\ntype someVariant = One | Two | Three(int, string)", - "documentation": null, - "insertText": "One", - "insertTextFormat": 2 + "detail": "file module", + "documentation": null + }, { + "label": "Objects", + "kind": 9, + "tags": [], + "detail": "file module", + "documentation": null }] Complete src/CompletionExpressions.res 56:57 @@ -319,16 +149,7 @@ Resolved opens 1 pervasives ContextPath CArgument Value[fnTakingRecord]($0) ContextPath Value[fnTakingRecord] Path fnTakingRecord -[{ - "label": "{}", - "kind": 12, - "tags": [], - "detail": "someRecord", - "documentation": null, - "sortText": "A", - "insertText": "{$0}", - "insertTextFormat": 2 - }] +[] Complete src/CompletionExpressions.res 59:60 posCursor:[59:60] posNoWhite:[59:59] Found expr:[59:11->59:65] @@ -339,19 +160,7 @@ Resolved opens 1 pervasives ContextPath CArgument Value[fnTakingRecord]($0) ContextPath Value[fnTakingRecord] Path fnTakingRecord -[{ - "label": "true", - "kind": 4, - "tags": [], - "detail": "bool", - "documentation": null - }, { - "label": "false", - "kind": 4, - "tags": [], - "detail": "bool", - "documentation": null - }] +[] Complete src/CompletionExpressions.res 62:62 posCursor:[62:62] posNoWhite:[62:61] Found expr:[62:11->62:66] @@ -362,13 +171,7 @@ Resolved opens 1 pervasives ContextPath CArgument Value[fnTakingRecord]($0) ContextPath Value[fnTakingRecord] Path fnTakingRecord -[{ - "label": "true", - "kind": 4, - "tags": [], - "detail": "bool", - "documentation": null - }] +[] Complete src/CompletionExpressions.res 69:25 posCursor:[69:25] posNoWhite:[69:24] Found expr:[69:11->69:26] @@ -379,16 +182,7 @@ Resolved opens 1 pervasives ContextPath CArgument Value[fnTakingArray]($0) ContextPath Value[fnTakingArray] Path fnTakingArray -[{ - "label": "[]", - "kind": 12, - "tags": [], - "detail": "option", - "documentation": null, - "sortText": "A", - "insertText": "[$0]", - "insertTextFormat": 2 - }] +[] Complete src/CompletionExpressions.res 72:26 posCursor:[72:26] posNoWhite:[72:25] Found expr:[72:11->72:28] @@ -399,33 +193,7 @@ Resolved opens 1 pervasives ContextPath CArgument Value[fnTakingArray]($0) ContextPath Value[fnTakingArray] Path fnTakingArray -[{ - "label": "None", - "kind": 12, - "tags": [], - "detail": "bool", - "documentation": null - }, { - "label": "Some(_)", - "kind": 12, - "tags": [], - "detail": "bool", - "documentation": null, - "insertText": "Some(${1:_})", - "insertTextFormat": 2 - }, { - "label": "Some(true)", - "kind": 4, - "tags": [], - "detail": "bool", - "documentation": null - }, { - "label": "Some(false)", - "kind": 4, - "tags": [], - "detail": "bool", - "documentation": null - }] +[] Complete src/CompletionExpressions.res 75:26 posCursor:[75:26] posNoWhite:[75:25] Found expr:[75:11->75:27] @@ -453,19 +221,7 @@ Resolved opens 1 pervasives ContextPath CArgument Value[fnTakingArray]($0) ContextPath Value[fnTakingArray] Path fnTakingArray -[{ - "label": "true", - "kind": 4, - "tags": [], - "detail": "bool", - "documentation": null - }, { - "label": "false", - "kind": 4, - "tags": [], - "detail": "bool", - "documentation": null - }] +[] Complete src/CompletionExpressions.res 81:31 posCursor:[81:31] posNoWhite:[81:30] Found expr:[81:11->81:34] @@ -476,33 +232,7 @@ Resolved opens 1 pervasives ContextPath CArgument Value[fnTakingArray]($0) ContextPath Value[fnTakingArray] Path fnTakingArray -[{ - "label": "None", - "kind": 12, - "tags": [], - "detail": "bool", - "documentation": null - }, { - "label": "Some(_)", - "kind": 12, - "tags": [], - "detail": "bool", - "documentation": null, - "insertText": "Some(${1:_})", - "insertTextFormat": 2 - }, { - "label": "Some(true)", - "kind": 4, - "tags": [], - "detail": "bool", - "documentation": null - }, { - "label": "Some(false)", - "kind": 4, - "tags": [], - "detail": "bool", - "documentation": null - }] +[] Complete src/CompletionExpressions.res 84:31 posCursor:[84:31] posNoWhite:[84:30] Found expr:[84:11->84:40] @@ -513,33 +243,7 @@ Resolved opens 1 pervasives ContextPath CArgument Value[fnTakingArray]($0) ContextPath Value[fnTakingArray] Path fnTakingArray -[{ - "label": "None", - "kind": 12, - "tags": [], - "detail": "bool", - "documentation": null - }, { - "label": "Some(_)", - "kind": 12, - "tags": [], - "detail": "bool", - "documentation": null, - "insertText": "Some(${1:_})", - "insertTextFormat": 2 - }, { - "label": "Some(true)", - "kind": 4, - "tags": [], - "detail": "bool", - "documentation": null - }, { - "label": "Some(false)", - "kind": 4, - "tags": [], - "detail": "bool", - "documentation": null - }] +[] Complete src/CompletionExpressions.res 89:38 posCursor:[89:38] posNoWhite:[89:37] Found expr:[89:11->89:41] @@ -567,16 +271,7 @@ Resolved opens 1 pervasives ContextPath CArgument Value[fnTakingOtherRecord]($0) ContextPath Value[fnTakingOtherRecord] Path fnTakingOtherRecord -[{ - "label": "\"\"", - "kind": 12, - "tags": [], - "detail": "string", - "documentation": null, - "sortText": "A", - "insertText": "\"$0\"", - "insertTextFormat": 2 - }] +[] Complete src/CompletionExpressions.res 108:57 posCursor:[108:57] posNoWhite:[108:56] Found expr:[108:11->108:60] @@ -587,19 +282,7 @@ Resolved opens 1 pervasives ContextPath CArgument Value[fnTakingRecordWithOptionalField]($0) ContextPath Value[fnTakingRecordWithOptionalField] Path fnTakingRecordWithOptionalField -[{ - "label": "true", - "kind": 4, - "tags": [], - "detail": "bool", - "documentation": null - }, { - "label": "false", - "kind": 4, - "tags": [], - "detail": "bool", - "documentation": null - }] +[] Complete src/CompletionExpressions.res 116:53 posCursor:[116:53] posNoWhite:[116:52] Found expr:[116:11->116:56] @@ -610,53 +293,7 @@ Resolved opens 1 pervasives ContextPath CArgument Value[fnTakingRecordWithOptVariant]($0) ContextPath Value[fnTakingRecordWithOptVariant] Path fnTakingRecordWithOptVariant -[{ - "label": "Some(someVariant)", - "kind": 12, - "tags": [], - "detail": "someVariant", - "documentation": null, - "insertText": "Some(${1:someVariant})", - "insertTextFormat": 2 - }, { - "label": "Some(_)", - "kind": 12, - "tags": [], - "detail": "someVariant", - "documentation": null, - "insertText": "Some(${1:_})", - "insertTextFormat": 2 - }, { - "label": "None", - "kind": 12, - "tags": [], - "detail": "someVariant", - "documentation": null - }, { - "label": "Some(One)", - "kind": 4, - "tags": [], - "detail": "One\n\ntype someVariant = One | Two | Three(int, string)", - "documentation": null, - "insertText": "Some(One)", - "insertTextFormat": 2 - }, { - "label": "Some(Two)", - "kind": 4, - "tags": [], - "detail": "Two\n\ntype someVariant = One | Two | Three(int, string)", - "documentation": null, - "insertText": "Some(Two)", - "insertTextFormat": 2 - }, { - "label": "Some(Three(_, _))", - "kind": 4, - "tags": [], - "detail": "Three(int, string)\n\ntype someVariant = One | Two | Three(int, string)", - "documentation": null, - "insertText": "Some(Three(${1:_}, ${2:_}))", - "insertTextFormat": 2 - }] +[] Complete src/CompletionExpressions.res 126:49 posCursor:[126:49] posNoWhite:[126:48] Found expr:[126:11->126:51] @@ -667,16 +304,7 @@ Resolved opens 1 pervasives ContextPath CArgument Value[fnTakingInlineRecord]($0) ContextPath Value[fnTakingInlineRecord] Path fnTakingInlineRecord -[{ - "label": "{}", - "kind": 4, - "tags": [], - "detail": "Inline record", - "documentation": null, - "sortText": "A", - "insertText": "{$0}", - "insertTextFormat": 2 - }] +[] Complete src/CompletionExpressions.res 129:50 posCursor:[129:50] posNoWhite:[129:49] Found expr:[129:11->129:53] @@ -687,25 +315,7 @@ Resolved opens 1 pervasives ContextPath CArgument Value[fnTakingInlineRecord]($0) ContextPath Value[fnTakingInlineRecord] Path fnTakingInlineRecord -[{ - "label": "someBoolField", - "kind": 4, - "tags": [], - "detail": "Inline record", - "documentation": null - }, { - "label": "otherField", - "kind": 4, - "tags": [], - "detail": "Inline record", - "documentation": null - }, { - "label": "nestedRecord", - "kind": 4, - "tags": [], - "detail": "Inline record", - "documentation": null - }] +[] Complete src/CompletionExpressions.res 132:51 posCursor:[132:51] posNoWhite:[132:50] Found expr:[132:11->132:54] @@ -717,10 +327,16 @@ ContextPath CArgument Value[fnTakingInlineRecord]($0) ContextPath Value[fnTakingInlineRecord] Path fnTakingInlineRecord [{ - "label": "someBoolField", - "kind": 4, + "label": "someBoolVar", + "kind": 12, + "tags": [], + "detail": "bool", + "documentation": null + }, { + "label": "s", + "kind": 12, "tags": [], - "detail": "Inline record", + "detail": "bool", "documentation": null }] @@ -733,16 +349,7 @@ Resolved opens 1 pervasives ContextPath CArgument Value[fnTakingInlineRecord]($0) ContextPath Value[fnTakingInlineRecord] Path fnTakingInlineRecord -[{ - "label": "{}", - "kind": 12, - "tags": [], - "detail": "otherRecord", - "documentation": null, - "sortText": "A", - "insertText": "{$0}", - "insertTextFormat": 2 - }] +[] Complete src/CompletionExpressions.res 138:65 posCursor:[138:65] posNoWhite:[138:64] Found expr:[138:11->138:70] @@ -753,19 +360,7 @@ Resolved opens 1 pervasives ContextPath CArgument Value[fnTakingInlineRecord]($0) ContextPath Value[fnTakingInlineRecord] Path fnTakingInlineRecord -[{ - "label": "someField", - "kind": 5, - "tags": [], - "detail": "someField: int\n\notherRecord", - "documentation": null - }, { - "label": "otherField", - "kind": 5, - "tags": [], - "detail": "otherField: string\n\notherRecord", - "documentation": null - }] +[] Complete src/CompletionExpressions.res 159:20 posCursor:[159:20] posNoWhite:[159:19] Found expr:[159:3->159:21] @@ -776,16 +371,7 @@ Resolved opens 1 pervasives ContextPath CArgument Value[fnTakingCallback]($0) ContextPath Value[fnTakingCallback] Path fnTakingCallback -[{ - "label": "() => {}", - "kind": 12, - "tags": [], - "detail": "unit => unit", - "documentation": null, - "sortText": "A", - "insertText": "() => {$0}", - "insertTextFormat": 2 - }] +[] Complete src/CompletionExpressions.res 162:21 posCursor:[162:21] posNoWhite:[162:20] Found expr:[162:3->162:22] @@ -807,16 +393,7 @@ Resolved opens 1 pervasives ContextPath CArgument Value[fnTakingCallback]($1) ContextPath Value[fnTakingCallback] Path fnTakingCallback -[{ - "label": "v => {}", - "kind": 12, - "tags": [], - "detail": "bool => unit", - "documentation": null, - "sortText": "A", - "insertText": "${1:v} => {$0}", - "insertTextFormat": 2 - }] +[] Complete src/CompletionExpressions.res 168:25 posCursor:[168:25] posNoWhite:[168:24] Found expr:[168:3->168:27] @@ -827,16 +404,7 @@ Resolved opens 1 pervasives ContextPath CArgument Value[fnTakingCallback]($2) ContextPath Value[fnTakingCallback] Path fnTakingCallback -[{ - "label": "event => {}", - "kind": 12, - "tags": [], - "detail": "ReactEvent.Mouse.t => unit", - "documentation": null, - "sortText": "A", - "insertText": "${1:event} => {$0}", - "insertTextFormat": 2 - }] +[] Complete src/CompletionExpressions.res 171:29 posCursor:[171:29] posNoWhite:[171:27] Found expr:[171:3->171:30] @@ -847,16 +415,7 @@ Resolved opens 1 pervasives ContextPath CArgument Value[fnTakingCallback]($3) ContextPath Value[fnTakingCallback] Path fnTakingCallback -[{ - "label": "(~on, ~off=?, variant) => {}", - "kind": 12, - "tags": [], - "detail": "(~on: bool, ~off: bool=?, variant) => int", - "documentation": null, - "sortText": "A", - "insertText": "(~on, ~off=?, ${1:variant}) => {$0}", - "insertTextFormat": 2 - }] +[] Complete src/CompletionExpressions.res 174:32 posCursor:[174:32] posNoWhite:[174:30] Found expr:[174:3->174:33] @@ -867,16 +426,7 @@ Resolved opens 1 pervasives ContextPath CArgument Value[fnTakingCallback]($4) ContextPath Value[fnTakingCallback] Path fnTakingCallback -[{ - "label": "(v1, v2, v3) => {}", - "kind": 12, - "tags": [], - "detail": "(bool, option, bool) => unit", - "documentation": null, - "sortText": "A", - "insertText": "(${1:v1}, ${2:v2}, ${3:v3}) => {$0}", - "insertTextFormat": 2 - }] +[] Complete src/CompletionExpressions.res 177:34 posCursor:[177:34] posNoWhite:[177:33] Found expr:[177:3->177:36] @@ -887,16 +437,7 @@ Resolved opens 1 pervasives ContextPath CArgument Value[fnTakingCallback]($5) ContextPath Value[fnTakingCallback] Path fnTakingCallback -[{ - "label": "(~on=?, ~off=?, ()) => {}", - "kind": 12, - "tags": [], - "detail": "(~on: bool=?, ~off: bool=?, unit) => int", - "documentation": null, - "sortText": "A", - "insertText": "(~on=?, ~off=?, ()) => {$0}", - "insertTextFormat": 2 - }] +[] Complete src/CompletionExpressions.res 185:10 posCursor:[185:10] posNoWhite:[185:9] Found expr:[181:2->185:11] @@ -963,16 +504,7 @@ Resolved opens 1 pervasives ContextPath CArgument Value[takesCb]($0) ContextPath Value[takesCb] Path takesCb -[{ - "label": "someTyp => {}", - "kind": 12, - "tags": [], - "detail": "someTyp => 'a", - "documentation": null, - "sortText": "A", - "insertText": "${1:someTyp} => {$0}", - "insertTextFormat": 2 - }] +[] Complete src/CompletionExpressions.res 216:12 posCursor:[216:12] posNoWhite:[216:11] Found expr:[216:3->216:13] @@ -983,16 +515,7 @@ Resolved opens 1 pervasives ContextPath CArgument Value[takesCb2]($0) ContextPath Value[takesCb2] Path takesCb2 -[{ - "label": "environment => {}", - "kind": 12, - "tags": [], - "detail": "Environment.t => 'a", - "documentation": null, - "sortText": "A", - "insertText": "${1:environment} => {$0}", - "insertTextFormat": 2 - }] +[] Complete src/CompletionExpressions.res 225:12 posCursor:[225:12] posNoWhite:[225:11] Found expr:[225:3->225:13] @@ -1003,16 +526,7 @@ Resolved opens 1 pervasives ContextPath CArgument Value[takesCb3]($0) ContextPath Value[takesCb3] Path takesCb3 -[{ - "label": "apiCallResult => {}", - "kind": 12, - "tags": [], - "detail": "apiCallResult => 'a", - "documentation": null, - "sortText": "A", - "insertText": "${1:apiCallResult} => {$0}", - "insertTextFormat": 2 - }] +[] Complete src/CompletionExpressions.res 232:12 posCursor:[232:12] posNoWhite:[232:11] Found expr:[232:3->232:13] @@ -1023,16 +537,7 @@ Resolved opens 1 pervasives ContextPath CArgument Value[takesCb4]($0) ContextPath Value[takesCb4] Path takesCb4 -[{ - "label": "apiCallResult => {}", - "kind": 12, - "tags": [], - "detail": "option => 'a", - "documentation": null, - "sortText": "A", - "insertText": "${1:apiCallResult} => {$0}", - "insertTextFormat": 2 - }] +[] Complete src/CompletionExpressions.res 239:12 posCursor:[239:12] posNoWhite:[239:11] Found expr:[239:3->239:13] @@ -1043,16 +548,7 @@ Resolved opens 1 pervasives ContextPath CArgument Value[takesCb5]($0) ContextPath Value[takesCb5] Path takesCb5 -[{ - "label": "apiCallResults => {}", - "kind": 12, - "tags": [], - "detail": "array> => 'a", - "documentation": null, - "sortText": "A", - "insertText": "${1:apiCallResults} => {$0}", - "insertTextFormat": 2 - }] +[] Complete src/CompletionExpressions.res 250:30 posCursor:[250:30] posNoWhite:[250:29] Found expr:[250:3->250:31] @@ -1063,14 +559,5 @@ Resolved opens 1 pervasives ContextPath CArgument Value[commitLocalUpdate](~updater) ContextPath Value[commitLocalUpdate] Path commitLocalUpdate -[{ - "label": "recordSourceSelectorProxy => {}", - "kind": 12, - "tags": [], - "detail": "RecordSourceSelectorProxy.t => unit", - "documentation": null, - "sortText": "A", - "insertText": "${1:recordSourceSelectorProxy} => {$0}", - "insertTextFormat": 2 - }] +[] diff --git a/analysis/tests/src/expected/CompletionFunctionArguments.res.txt b/analysis/tests/src/expected/CompletionFunctionArguments.res.txt index d15f00087..596fc5573 100644 --- a/analysis/tests/src/expected/CompletionFunctionArguments.res.txt +++ b/analysis/tests/src/expected/CompletionFunctionArguments.res.txt @@ -7,19 +7,7 @@ Resolved opens 1 pervasives ContextPath CArgument Value[someFn](~isOn) ContextPath Value[someFn] Path someFn -[{ - "label": "true", - "kind": 4, - "tags": [], - "detail": "bool", - "documentation": null - }, { - "label": "false", - "kind": 4, - "tags": [], - "detail": "bool", - "documentation": null - }] +[] Complete src/CompletionFunctionArguments.res 13:25 posCursor:[13:25] posNoWhite:[13:24] Found expr:[13:11->13:26] @@ -31,13 +19,6 @@ ContextPath CArgument Value[someFn](~isOn) ContextPath Value[someFn] Path someFn [{ - "label": "true", - "kind": 4, - "tags": [], - "detail": "bool", - "documentation": null, - "sortText": "A true" - }, { "label": "tLocalVar", "kind": 12, "tags": [], @@ -54,19 +35,7 @@ Resolved opens 1 pervasives ContextPath CArgument Value[someFn](~isOff) ContextPath Value[someFn] Path someFn -[{ - "label": "true", - "kind": 4, - "tags": [], - "detail": "bool", - "documentation": null - }, { - "label": "false", - "kind": 4, - "tags": [], - "detail": "bool", - "documentation": null - }] +[] Complete src/CompletionFunctionArguments.res 21:27 posCursor:[21:27] posNoWhite:[21:26] Found expr:[19:21->25:1] @@ -81,19 +50,7 @@ Resolved opens 1 pervasives ContextPath CArgument Value[someFn](~isOn) ContextPath Value[someFn] Path someFn -[{ - "label": "true", - "kind": 4, - "tags": [], - "detail": "bool", - "documentation": null - }, { - "label": "false", - "kind": 4, - "tags": [], - "detail": "bool", - "documentation": null - }] +[] Complete src/CompletionFunctionArguments.res 34:24 posCursor:[34:24] posNoWhite:[34:23] Found expr:[34:11->34:25] @@ -104,13 +61,7 @@ Resolved opens 1 pervasives ContextPath CArgument Value[someOtherFn]($0) ContextPath Value[someOtherFn] Path someOtherFn -[{ - "label": "false", - "kind": 4, - "tags": [], - "detail": "bool", - "documentation": null - }] +[] Complete src/CompletionFunctionArguments.res 51:39 posCursor:[51:39] posNoWhite:[51:38] Found expr:[51:11->51:40] @@ -121,31 +72,7 @@ Resolved opens 1 pervasives ContextPath CArgument Value[someFnTakingVariant](~config) ContextPath Value[someFnTakingVariant] Path someFnTakingVariant -[{ - "label": "One", - "kind": 4, - "tags": [], - "detail": "One\n\ntype someVariant = One | Two | Three(int, string)", - "documentation": null, - "insertText": "One", - "insertTextFormat": 2 - }, { - "label": "Two", - "kind": 4, - "tags": [], - "detail": "Two\n\ntype someVariant = One | Two | Three(int, string)", - "documentation": null, - "insertText": "Two", - "insertTextFormat": 2 - }, { - "label": "Three(_, _)", - "kind": 4, - "tags": [], - "detail": "Three(int, string)\n\ntype someVariant = One | Two | Three(int, string)", - "documentation": null, - "insertText": "Three(${1:_}, ${2:_})", - "insertTextFormat": 2 - }] +[] Complete src/CompletionFunctionArguments.res 54:40 posCursor:[54:40] posNoWhite:[54:39] Found expr:[54:11->54:41] @@ -157,15 +84,6 @@ ContextPath CArgument Value[someFnTakingVariant](~config) ContextPath Value[someFnTakingVariant] Path someFnTakingVariant [{ - "label": "One", - "kind": 4, - "tags": [], - "detail": "One\n\ntype someVariant = One | Two | Three(int, string)", - "documentation": null, - "sortText": "A One", - "insertText": "One", - "insertTextFormat": 2 - }, { "label": "OIncludeMeInCompletions", "kind": 9, "tags": [], @@ -195,15 +113,6 @@ ContextPath CArgument Value[someFnTakingVariant]($0) ContextPath Value[someFnTakingVariant] Path someFnTakingVariant [{ - "label": "Some(_)", - "kind": 12, - "tags": [], - "detail": "someVariant", - "documentation": null, - "sortText": "A Some(_)", - "insertText": "Some(${1:_})", - "insertTextFormat": 2 - }, { "label": "Sort", "kind": 9, "tags": [], @@ -221,15 +130,6 @@ ContextPath CArgument Value[someFnTakingVariant](~configOpt2) ContextPath Value[someFnTakingVariant] Path someFnTakingVariant [{ - "label": "One", - "kind": 4, - "tags": [], - "detail": "One\n\ntype someVariant = One | Two | Three(int, string)", - "documentation": null, - "sortText": "A One", - "insertText": "One", - "insertTextFormat": 2 - }, { "label": "OIncludeMeInCompletions", "kind": 9, "tags": [], @@ -258,19 +158,7 @@ Resolved opens 1 pervasives ContextPath CArgument Value[someOtherFn]($0) ContextPath Value[someOtherFn] Path someOtherFn -[{ - "label": "true", - "kind": 4, - "tags": [], - "detail": "bool", - "documentation": null - }, { - "label": "false", - "kind": 4, - "tags": [], - "detail": "bool", - "documentation": null - }] +[] Complete src/CompletionFunctionArguments.res 66:28 posCursor:[66:28] posNoWhite:[66:27] Found expr:[66:11->66:30] @@ -281,19 +169,7 @@ Resolved opens 1 pervasives ContextPath CArgument Value[someOtherFn]($2) ContextPath Value[someOtherFn] Path someOtherFn -[{ - "label": "true", - "kind": 4, - "tags": [], - "detail": "bool", - "documentation": null - }, { - "label": "false", - "kind": 4, - "tags": [], - "detail": "bool", - "documentation": null - }] +[] Complete src/CompletionFunctionArguments.res 69:30 posCursor:[69:30] posNoWhite:[69:29] Found expr:[69:11->69:31] @@ -304,13 +180,6 @@ ContextPath CArgument Value[someOtherFn]($2) ContextPath Value[someOtherFn] Path someOtherFn [{ - "label": "true", - "kind": 4, - "tags": [], - "detail": "bool", - "documentation": null, - "sortText": "A true" - }, { "label": "tLocalVar", "kind": 12, "tags": [], @@ -327,15 +196,7 @@ Resolved opens 1 pervasives ContextPath CArgument Value[fnTakingTuple]($0) ContextPath Value[fnTakingTuple] Path fnTakingTuple -[{ - "label": "(_, _, _)", - "kind": 12, - "tags": [], - "detail": "(int, int, float)", - "documentation": null, - "insertText": "(${1:_}, ${2:_}, ${3:_})", - "insertTextFormat": 2 - }] +[] Complete src/CompletionFunctionArguments.res 89:27 posCursor:[89:27] posNoWhite:[89:26] Found expr:[89:11->89:29] @@ -346,25 +207,7 @@ Resolved opens 1 pervasives ContextPath CArgument Value[fnTakingRecord]($0) ContextPath Value[fnTakingRecord] Path fnTakingRecord -[{ - "label": "age", - "kind": 5, - "tags": [], - "detail": "age: int\n\nsomeRecord", - "documentation": null - }, { - "label": "offline", - "kind": 5, - "tags": [], - "detail": "offline: bool\n\nsomeRecord", - "documentation": null - }, { - "label": "online", - "kind": 5, - "tags": [], - "detail": "online: option\n\nsomeRecord", - "documentation": null - }] +[] Complete src/CompletionFunctionArguments.res 109:29 posCursor:[109:29] posNoWhite:[109:28] Found expr:[105:3->114:4] @@ -387,7 +230,7 @@ Path ReactEvent.Mouse.a "label": "ReactEvent.Mouse.altKey", "kind": 12, "tags": [], - "detail": "t => bool", + "detail": "(. t) => bool", "documentation": null }] @@ -412,7 +255,7 @@ Path ReactEvent.Mouse.a "label": "ReactEvent.Mouse.altKey", "kind": 12, "tags": [], - "detail": "t => bool", + "detail": "(. t) => bool", "documentation": null }] diff --git a/analysis/tests/src/expected/CompletionInferValues.res.txt b/analysis/tests/src/expected/CompletionInferValues.res.txt index 55b527da6..2bb824727 100644 --- a/analysis/tests/src/expected/CompletionInferValues.res.txt +++ b/analysis/tests/src/expected/CompletionInferValues.res.txt @@ -97,19 +97,7 @@ ContextPath CArgument CArgument Value[someFnWithCallback]($0)(~someRecord) ContextPath CArgument Value[someFnWithCallback]($0) ContextPath Value[someFnWithCallback] Path someFnWithCallback -[{ - "label": "name", - "kind": 5, - "tags": [], - "detail": "name: string\n\ntype someRecord = {name: string, age: int}", - "documentation": null - }, { - "label": "age", - "kind": 5, - "tags": [], - "detail": "age: int\n\ntype someRecord = {name: string, age: int}", - "documentation": null - }] +[] Complete src/CompletionInferValues.res 27:90 posCursor:[27:90] posNoWhite:[27:89] Found expr:[27:39->27:91] @@ -131,19 +119,7 @@ ContextPath Value[aliasedFn] Path aliasedFn ContextPath Value[someFnWithCallback] Path someFnWithCallback -[{ - "label": "name", - "kind": 5, - "tags": [], - "detail": "name: string\n\ntype someRecord = {name: string, age: int}", - "documentation": null - }, { - "label": "age", - "kind": 5, - "tags": [], - "detail": "age: int\n\ntype someRecord = {name: string, age: int}", - "documentation": null - }] +[] Complete src/CompletionInferValues.res 30:36 posCursor:[30:36] posNoWhite:[30:35] Found expr:[30:3->30:39] @@ -160,17 +136,7 @@ ContextPath CArgument CArgument Value[reactEventFn]($0)($0) ContextPath CArgument Value[reactEventFn]($0) ContextPath Value[reactEventFn] Path reactEventFn -CPPipe env:CompletionInferValues -CPPipe type path:ReactEvent.Mouse.t -CPPipe pathFromEnv:ReactEvent.Mouse found:false -Path ReactEvent.Mouse.pr -[{ - "label": "ReactEvent.Mouse.preventDefault", - "kind": 12, - "tags": [], - "detail": "t => unit", - "documentation": null - }] +[] Complete src/CompletionInferValues.res 41:50 posCursor:[41:50] posNoWhite:[41:49] Found expr:[41:12->41:56] @@ -186,18 +152,8 @@ Path event ContextPath CArgument CJsxPropValue [div] onMouseEnter($0) ContextPath CJsxPropValue [div] onMouseEnter Path ReactDOM.domProps -Path Pervasives.JsxDOM.domProps -CPPipe env:CompletionInferValues -CPPipe type path:JsxEventC.Mouse.t -CPPipe pathFromEnv:JsxEventC.Mouse found:false -Path JsxEventC.Mouse.pr -[{ - "label": "JsxEventC.Mouse.preventDefault", - "kind": 12, - "tags": [], - "detail": "t => unit", - "documentation": null - }] +Path PervasivesU.JsxDOM.domProps +[] Complete src/CompletionInferValues.res 44:50 posCursor:[44:50] posNoWhite:[44:49] Found expr:[44:12->44:56] @@ -213,17 +169,7 @@ Path event ContextPath CArgument CJsxPropValue [Div] onMouseEnter($0) ContextPath CJsxPropValue [Div] onMouseEnter Path Div.make -CPPipe env:CompletionInferValues envFromCompletionItem:CompletionInferValues.Div -CPPipe type path:Pervasives.JsxEvent.Mouse.t -CPPipe pathFromEnv:Pervasives.JsxEvent.Mouse found:false -Path Pervasives.JsxEvent.Mouse.pr -[{ - "label": "Pervasives.JsxEvent.Mouse.preventDefault", - "kind": 12, - "tags": [], - "detail": "t => unit", - "documentation": null - }] +[] Complete src/CompletionInferValues.res 47:87 posCursor:[47:87] posNoWhite:[47:86] Found expr:[47:12->47:93] @@ -688,19 +634,7 @@ ContextPath CArgument CArgument Value[fnWithRecordCallback]($0)($0) ContextPath CArgument Value[fnWithRecordCallback]($0) ContextPath Value[fnWithRecordCallback] Path fnWithRecordCallback -[{ - "label": "name", - "kind": 5, - "tags": [], - "detail": "name: string\n\nsomeRecord", - "documentation": null - }, { - "label": "age", - "kind": 5, - "tags": [], - "detail": "age: int\n\nsomeRecord", - "documentation": null - }] +[] Complete src/CompletionInferValues.res 137:30 posCursor:[137:30] posNoWhite:[137:29] Found expr:[137:3->137:33] @@ -719,23 +653,7 @@ ContextPath CArgument CArgument Value[fn2](~cb)($0) ContextPath CArgument Value[fn2](~cb) ContextPath Value[fn2] Path fn2 -CPPipe env:CompletionInferValues -CPPipe type path:ReactDOM.Client.Root.t -CPPipe pathFromEnv:ReactDOM.Client.Root found:false -Path ReactDOM.Client.Root. -[{ - "label": "ReactDOM.Client.Root.unmount", - "kind": 12, - "tags": [], - "detail": "(t, unit) => unit", - "documentation": null - }, { - "label": "ReactDOM.Client.Root.render", - "kind": 12, - "tags": [], - "detail": "(t, React.element) => unit", - "documentation": null - }] +[] Complete src/CompletionInferValues.res 146:30 posCursor:[146:30] posNoWhite:[146:29] Found expr:[146:3->146:33] @@ -754,29 +672,7 @@ ContextPath CArgument CArgument Value[fn3](~cb)($0) ContextPath CArgument Value[fn3](~cb) ContextPath Value[fn3] Path fn3 -CPPipe env:CompletionInferValues -CPPipe type path:CompletionSupport.Test.t -CPPipe pathFromEnv:CompletionSupport.Test found:false -Path CompletionSupport.Test. -[{ - "label": "CompletionSupport.Test.add", - "kind": 12, - "tags": [], - "detail": "t => int", - "documentation": null - }, { - "label": "CompletionSupport.Test.addSelf", - "kind": 12, - "tags": [], - "detail": "t => t", - "documentation": null - }, { - "label": "CompletionSupport.Test.make", - "kind": 12, - "tags": [], - "detail": "int => t", - "documentation": null - }] +[] Complete src/CompletionInferValues.res 150:47 XXX Not found! @@ -833,13 +729,7 @@ ContextPath CArgument CArgument Value[CompletionSupport2, makeRenderer](~render) ContextPath CArgument Value[CompletionSupport2, makeRenderer](~render) ContextPath Value[CompletionSupport2, makeRenderer] Path CompletionSupport2.makeRenderer -[{ - "label": "root", - "kind": 5, - "tags": [], - "detail": "root: ReactDOM.Client.Root.t\n\ntype config = {root: ReactDOM.Client.Root.t}", - "documentation": null - }] +[] Complete src/CompletionInferValues.res 162:110 posCursor:[162:110] posNoWhite:[162:109] Found expr:[162:18->162:115] @@ -858,21 +748,5 @@ ContextPath CArgument CArgument Value[CompletionSupport2, makeRenderer](~render) ContextPath CArgument Value[CompletionSupport2, makeRenderer](~render) ContextPath Value[CompletionSupport2, makeRenderer] Path CompletionSupport2.makeRenderer -CPPipe env:CompletionInferValues envFromCompletionItem:CompletionSupport2.Internal -CPPipe type path:ReactDOM.Client.Root.t -CPPipe pathFromEnv:ReactDOM.Client.Root found:false -Path ReactDOM.Client.Root. -[{ - "label": "ReactDOM.Client.Root.unmount", - "kind": 12, - "tags": [], - "detail": "(t, unit) => unit", - "documentation": null - }, { - "label": "ReactDOM.Client.Root.render", - "kind": 12, - "tags": [], - "detail": "(t, React.element) => unit", - "documentation": null - }] +[] diff --git a/analysis/tests/src/expected/CompletionJsx.res.txt b/analysis/tests/src/expected/CompletionJsx.res.txt index fba67fac1..f426625d9 100644 --- a/analysis/tests/src/expected/CompletionJsx.res.txt +++ b/analysis/tests/src/expected/CompletionJsx.res.txt @@ -465,11 +465,5 @@ Completable: Cjsx([CompWithoutJsxPpx], n, [n]) Package opens Pervasives.JsxModules.place holder Resolved opens 1 pervasives Path CompWithoutJsxPpx.make -[{ - "label": "name", - "kind": 4, - "tags": [], - "detail": "string", - "documentation": null - }] +[] diff --git a/analysis/tests/src/expected/CompletionJsxProps.res.txt b/analysis/tests/src/expected/CompletionJsxProps.res.txt index 475fbb2cf..df583dc63 100644 --- a/analysis/tests/src/expected/CompletionJsxProps.res.txt +++ b/analysis/tests/src/expected/CompletionJsxProps.res.txt @@ -6,19 +6,7 @@ Package opens Pervasives.JsxModules.place holder Resolved opens 1 pervasives ContextPath CJsxPropValue [CompletionSupport, TestComponent] on Path CompletionSupport.TestComponent.make -[{ - "label": "true", - "kind": 4, - "tags": [], - "detail": "bool", - "documentation": null - }, { - "label": "false", - "kind": 4, - "tags": [], - "detail": "bool", - "documentation": null - }] +[] Complete src/CompletionJsxProps.res 3:48 posCursor:[3:48] posNoWhite:[3:47] Found expr:[3:12->3:48] @@ -28,13 +16,7 @@ Package opens Pervasives.JsxModules.place holder Resolved opens 1 pervasives ContextPath CJsxPropValue [CompletionSupport, TestComponent] on Path CompletionSupport.TestComponent.make -[{ - "label": "true", - "kind": 4, - "tags": [], - "detail": "bool", - "documentation": null - }] +[] Complete src/CompletionJsxProps.res 6:50 posCursor:[6:50] posNoWhite:[6:49] Found expr:[6:12->6:50] @@ -45,24 +27,6 @@ Resolved opens 1 pervasives ContextPath CJsxPropValue [CompletionSupport, TestComponent] test Path CompletionSupport.TestComponent.make [{ - "label": "Two", - "kind": 4, - "tags": [], - "detail": "Two\n\ntype testVariant = One | Two | Three(int)", - "documentation": null, - "sortText": "A Two", - "insertText": "{Two}", - "insertTextFormat": 2 - }, { - "label": "Three(_)", - "kind": 4, - "tags": [], - "detail": "Three(int)\n\ntype testVariant = One | Two | Three(int)", - "documentation": null, - "sortText": "A Three(_)", - "insertText": "{Three(${1:_})}", - "insertTextFormat": 2 - }, { "label": "TableclothMap", "kind": 9, "tags": [], @@ -84,39 +48,7 @@ Package opens Pervasives.JsxModules.place holder Resolved opens 1 pervasives ContextPath CJsxPropValue [CompletionSupport, TestComponent] polyArg Path CompletionSupport.TestComponent.make -[{ - "label": "#one", - "kind": 4, - "tags": [], - "detail": "#one\n\n[#one | #three(int, bool) | #two | #two2]", - "documentation": null, - "insertText": "{#one}", - "insertTextFormat": 2 - }, { - "label": "#three(_, _)", - "kind": 4, - "tags": [], - "detail": "#three(int, bool)\n\n[#one | #three(int, bool) | #two | #two2]", - "documentation": null, - "insertText": "{#three(${1:_}, ${2:_})}", - "insertTextFormat": 2 - }, { - "label": "#two", - "kind": 4, - "tags": [], - "detail": "#two\n\n[#one | #three(int, bool) | #two | #two2]", - "documentation": null, - "insertText": "{#two}", - "insertTextFormat": 2 - }, { - "label": "#two2", - "kind": 4, - "tags": [], - "detail": "#two2\n\n[#one | #three(int, bool) | #two | #two2]", - "documentation": null, - "insertText": "{#two2}", - "insertTextFormat": 2 - }] +[] Complete src/CompletionJsxProps.res 12:54 posCursor:[12:54] posNoWhite:[12:53] Found expr:[12:12->12:54] @@ -126,31 +58,7 @@ Package opens Pervasives.JsxModules.place holder Resolved opens 1 pervasives ContextPath CJsxPropValue [CompletionSupport, TestComponent] polyArg Path CompletionSupport.TestComponent.make -[{ - "label": "#three(_, _)", - "kind": 4, - "tags": [], - "detail": "#three(int, bool)\n\n[#one | #three(int, bool) | #two | #two2]", - "documentation": null, - "insertText": "{three(${1:_}, ${2:_})}", - "insertTextFormat": 2 - }, { - "label": "#two", - "kind": 4, - "tags": [], - "detail": "#two\n\n[#one | #three(int, bool) | #two | #two2]", - "documentation": null, - "insertText": "{two}", - "insertTextFormat": 2 - }, { - "label": "#two2", - "kind": 4, - "tags": [], - "detail": "#two2\n\n[#one | #three(int, bool) | #two | #two2]", - "documentation": null, - "insertText": "{two2}", - "insertTextFormat": 2 - }] +[] Complete src/CompletionJsxProps.res 15:22 posCursor:[15:22] posNoWhite:[15:21] Found expr:[15:12->15:25] @@ -160,7 +68,7 @@ Package opens Pervasives.JsxModules.place holder Resolved opens 1 pervasives ContextPath CJsxPropValue [div] muted Path ReactDOM.domProps -Path Pervasives.JsxDOM.domProps +Path PervasivesU.JsxDOM.domProps [{ "label": "true", "kind": 4, @@ -183,15 +91,15 @@ Package opens Pervasives.JsxModules.place holder Resolved opens 1 pervasives ContextPath CJsxPropValue [div] onMouseEnter Path ReactDOM.domProps -Path Pervasives.JsxDOM.domProps +Path PervasivesU.JsxDOM.domProps [{ - "label": "event => {}", + "label": "(. event) => {}", "kind": 12, "tags": [], - "detail": "JsxEventC.Mouse.t => unit", + "detail": "JsxEventU.Mouse.t => unit", "documentation": null, "sortText": "A", - "insertText": "{${1:event} => {$0}}", + "insertText": "{(. ${1:event}) => {$0}}", "insertTextFormat": 2 }] @@ -203,16 +111,7 @@ Package opens Pervasives.JsxModules.place holder Resolved opens 1 pervasives ContextPath CJsxPropValue [CompletionSupport, TestComponent] testArr Path CompletionSupport.TestComponent.make -[{ - "label": "[]", - "kind": 12, - "tags": [], - "detail": "testVariant", - "documentation": null, - "sortText": "A", - "insertText": "{[$0]}", - "insertTextFormat": 2 - }] +[] Complete src/CompletionJsxProps.res 26:54 posCursor:[26:54] posNoWhite:[26:53] Found expr:[26:12->26:56] @@ -222,29 +121,5 @@ Package opens Pervasives.JsxModules.place holder Resolved opens 1 pervasives ContextPath CJsxPropValue [CompletionSupport, TestComponent] testArr Path CompletionSupport.TestComponent.make -[{ - "label": "One", - "kind": 4, - "tags": [], - "detail": "One\n\ntype testVariant = One | Two | Three(int)", - "documentation": null, - "insertText": "One", - "insertTextFormat": 2 - }, { - "label": "Two", - "kind": 4, - "tags": [], - "detail": "Two\n\ntype testVariant = One | Two | Three(int)", - "documentation": null, - "insertText": "Two", - "insertTextFormat": 2 - }, { - "label": "Three(_)", - "kind": 4, - "tags": [], - "detail": "Three(int)\n\ntype testVariant = One | Two | Three(int)", - "documentation": null, - "insertText": "Three(${1:_})", - "insertTextFormat": 2 - }] +[] diff --git a/analysis/tests/src/expected/CompletionPipeChain.res.txt b/analysis/tests/src/expected/CompletionPipeChain.res.txt index 52bfb0631..9d386b58e 100644 --- a/analysis/tests/src/expected/CompletionPipeChain.res.txt +++ b/analysis/tests/src/expected/CompletionPipeChain.res.txt @@ -14,25 +14,25 @@ Path Integer. "label": "Integer.toInt", "kind": 12, "tags": [], - "detail": "t => int", + "detail": "(. t) => int", "documentation": null }, { "label": "Integer.increment", "kind": 12, "tags": [], - "detail": "(t, int) => t", + "detail": "(. t, int) => t", "documentation": null }, { "label": "Integer.decrement", "kind": 12, "tags": [], - "detail": "(t, int => int) => t", + "detail": "(. t, (. int) => int) => t", "documentation": null }, { "label": "Integer.make", "kind": 12, "tags": [], - "detail": "int => t", + "detail": "(. int) => t", "documentation": null }] @@ -53,13 +53,13 @@ Path SuperFloat. "label": "SuperFloat.fromInteger", "kind": 12, "tags": [], - "detail": "Integer.t => t", + "detail": "(. Integer.t) => t", "documentation": null }, { "label": "SuperFloat.toInteger", "kind": 12, "tags": [], - "detail": "t => Integer.t", + "detail": "(. t) => Integer.t", "documentation": null }] @@ -80,25 +80,25 @@ Path Integer. "label": "Integer.toInt", "kind": 12, "tags": [], - "detail": "t => int", + "detail": "(. t) => int", "documentation": null }, { "label": "Integer.increment", "kind": 12, "tags": [], - "detail": "(t, int) => t", + "detail": "(. t, int) => t", "documentation": null }, { "label": "Integer.decrement", "kind": 12, "tags": [], - "detail": "(t, int => int) => t", + "detail": "(. t, (. int) => int) => t", "documentation": null }, { "label": "Integer.make", "kind": 12, "tags": [], - "detail": "int => t", + "detail": "(. int) => t", "documentation": null }] @@ -119,25 +119,25 @@ Path Integer. "label": "Integer.toInt", "kind": 12, "tags": [], - "detail": "t => int", + "detail": "(. t) => int", "documentation": null }, { "label": "Integer.increment", "kind": 12, "tags": [], - "detail": "(t, int) => t", + "detail": "(. t, int) => t", "documentation": null }, { "label": "Integer.decrement", "kind": 12, "tags": [], - "detail": "(t, int => int) => t", + "detail": "(. t, (. int) => int) => t", "documentation": null }, { "label": "Integer.make", "kind": 12, "tags": [], - "detail": "int => t", + "detail": "(. int) => t", "documentation": null }] @@ -158,25 +158,25 @@ Path Integer. "label": "Integer.toInt", "kind": 12, "tags": [], - "detail": "t => int", + "detail": "(. t) => int", "documentation": null }, { "label": "Integer.increment", "kind": 12, "tags": [], - "detail": "(t, int) => t", + "detail": "(. t, int) => t", "documentation": null }, { "label": "Integer.decrement", "kind": 12, "tags": [], - "detail": "(t, int => int) => t", + "detail": "(. t, (. int) => int) => t", "documentation": null }, { "label": "Integer.make", "kind": 12, "tags": [], - "detail": "int => t", + "detail": "(. int) => t", "documentation": null }] @@ -197,25 +197,25 @@ Path Integer. "label": "Integer.toInt", "kind": 12, "tags": [], - "detail": "t => int", + "detail": "(. t) => int", "documentation": null }, { "label": "Integer.increment", "kind": 12, "tags": [], - "detail": "(t, int) => t", + "detail": "(. t, int) => t", "documentation": null }, { "label": "Integer.decrement", "kind": 12, "tags": [], - "detail": "(t, int => int) => t", + "detail": "(. t, (. int) => int) => t", "documentation": null }, { "label": "Integer.make", "kind": 12, "tags": [], - "detail": "int => t", + "detail": "(. int) => t", "documentation": null }] @@ -236,13 +236,13 @@ Path SuperFloat. "label": "SuperFloat.fromInteger", "kind": 12, "tags": [], - "detail": "Integer.t => t", + "detail": "(. Integer.t) => t", "documentation": null }, { "label": "SuperFloat.toInteger", "kind": 12, "tags": [], - "detail": "t => Integer.t", + "detail": "(. t) => Integer.t", "documentation": null }] @@ -263,7 +263,7 @@ Path SuperFloat.t "label": "SuperFloat.toInteger", "kind": 12, "tags": [], - "detail": "t => Integer.t", + "detail": "(. t) => Integer.t", "documentation": null }] @@ -284,19 +284,19 @@ Path CompletionSupport.Test. "label": "CompletionSupport.Test.add", "kind": 12, "tags": [], - "detail": "t => int", + "detail": "(. t) => int", "documentation": null }, { "label": "CompletionSupport.Test.addSelf", "kind": 12, "tags": [], - "detail": "t => t", + "detail": "(. t) => t", "documentation": null }, { "label": "CompletionSupport.Test.make", "kind": 12, "tags": [], - "detail": "int => t", + "detail": "(. int) => t", "documentation": null }] @@ -317,19 +317,19 @@ Path CompletionSupport.Test. "label": "CompletionSupport.Test.add", "kind": 12, "tags": [], - "detail": "t => int", + "detail": "(. t) => int", "documentation": null }, { "label": "CompletionSupport.Test.addSelf", "kind": 12, "tags": [], - "detail": "t => t", + "detail": "(. t) => t", "documentation": null }, { "label": "CompletionSupport.Test.make", "kind": 12, "tags": [], - "detail": "int => t", + "detail": "(. int) => t", "documentation": null }] @@ -388,19 +388,19 @@ Path CompletionSupport.Test. "label": "CompletionSupport.Test.add", "kind": 12, "tags": [], - "detail": "t => int", + "detail": "(. t) => int", "documentation": null }, { "label": "CompletionSupport.Test.addSelf", "kind": 12, "tags": [], - "detail": "t => t", + "detail": "(. t) => t", "documentation": null }, { "label": "CompletionSupport.Test.make", "kind": 12, "tags": [], - "detail": "int => t", + "detail": "(. int) => t", "documentation": null }] @@ -420,19 +420,19 @@ Path CompletionSupport.Test. "label": "CompletionSupport.Test.add", "kind": 12, "tags": [], - "detail": "t => int", + "detail": "(. t) => int", "documentation": null }, { "label": "CompletionSupport.Test.addSelf", "kind": 12, "tags": [], - "detail": "t => t", + "detail": "(. t) => t", "documentation": null }, { "label": "CompletionSupport.Test.make", "kind": 12, "tags": [], - "detail": "int => t", + "detail": "(. int) => t", "documentation": null }] @@ -459,7 +459,7 @@ Path ReactDOM.Client.Root.ren "label": "ReactDOM.Client.Root.render", "kind": 12, "tags": [], - "detail": "(t, React.element) => unit", + "detail": "(. t, React.element) => unit", "documentation": null }] @@ -486,7 +486,7 @@ Path ReactDOM.Client.Root.ren "label": "ReactDOM.Client.Root.render", "kind": 12, "tags": [], - "detail": "(t, React.element) => unit", + "detail": "(. t, React.element) => unit", "documentation": null }] diff --git a/analysis/tests/src/expected/CompletionTypeAnnotation.res.txt b/analysis/tests/src/expected/CompletionTypeAnnotation.res.txt index cb0319ed2..6b0e6934d 100644 --- a/analysis/tests/src/expected/CompletionTypeAnnotation.res.txt +++ b/analysis/tests/src/expected/CompletionTypeAnnotation.res.txt @@ -142,13 +142,13 @@ Resolved opens 1 pervasives ContextPath Type[someFunc] Path someFunc [{ - "label": "(v1, v2) => {}", + "label": "(. => {}", "kind": 12, "tags": [], "detail": "(int, string) => bool", "documentation": null, "sortText": "A", - "insertText": "(${1:v1}, ${2:v2}) => {$0}", + "insertText": "(. => {$0}", "insertTextFormat": 2 }] diff --git a/analysis/tests/src/expected/CreateInterface.res.txt b/analysis/tests/src/expected/CreateInterface.res.txt index 4e1212948..53ac33d0e 100644 --- a/analysis/tests/src/expected/CreateInterface.res.txt +++ b/analysis/tests/src/expected/CreateInterface.res.txt @@ -1,15 +1,15 @@ Create Interface src/CreateInterface.res type r = {name: string, age: int} -let add: (~x: int, ~y: int) => int -@react.component -let make: (~name: string) => React.element +let add: (. ~x: int, ~y: int) => int + +let make: (. {"name": string}) => React.element module Other: { - @react.component - let otherComponentName: (~name: string) => React.element + + let otherComponentName: (. {"name": string}) => React.element } module Mod: { - @react.component - let make: (~name: string) => React.element + + let make: (. {"name": string}) => React.element } module type ModTyp = { @react.component @@ -48,8 +48,8 @@ module RFS: { } module Functor: () => { - @react.component - let make: unit => React.element + + let make: (. {.}) => React.element } module type FT = { module Functor: ( @@ -84,23 +84,23 @@ module type OptT = { } } module Opt: { - @react.component - let withOpt1: (~x: int=?, ~y: int) => int + + let withOpt1: (. {"x": option, "y": int}) => int module Opt2: { - @react.component - let withOpt2: (~x: int=?, ~y: int) => int + + let withOpt2: (. {"x": option, "y": int}) => int } module type Opt2 = { - @react.component - let withOpt2: (~x: int=?, ~y: int) => int + + let withOpt2: (. {"x": option, "y": int}) => int } module Opt3: { - @react.component - let withOpt3: (~x: option, ~y: int) => int + + let withOpt3: (. {"x": option, "y": int}) => int } module type Opt3 = { - @react.component - let withOpt3: (~x: option, ~y: int) => int + + let withOpt3: (. {"x": option, "y": int}) => int } } module Opt2: OptT diff --git a/analysis/tests/src/expected/Div.res.txt b/analysis/tests/src/expected/Div.res.txt index 29048516a..7fe628604 100644 --- a/analysis/tests/src/expected/Div.res.txt +++ b/analysis/tests/src/expected/Div.res.txt @@ -1,6 +1,6 @@ Hover src/Div.res 0:10 getLocItem #3: heuristic for
-{"contents": {"kind": "markdown", "value": "```rescript\n(\n string,\n ~props: ReactDOM_V3.domProps=?,\n array,\n) => React.element\n```\n\n---\n\n```\n \n```\n```rescript\ntype ReactDOM_V3.domProps = Props.domProps\n```\nGo to: [Type definition](command:rescript-vscode.go_to_location?%5B%22ReactDOM_V3.res%22%2C57%2C2%5D)\n\n\n---\n\n```\n \n```\n```rescript\ntype React.element = Jsx.element\n```\nGo to: [Type definition](command:rescript-vscode.go_to_location?%5B%22React.res%22%2C0%2C0%5D)\n"}} +{"contents": {"kind": "markdown", "value": "```rescript\n(.\n string,\n ~props: ReactDOM_V3.domProps=?,\n array,\n) => React.element\n```\n\n---\n\n```\n \n```\n```rescript\ntype ReactDOM_V3.domProps = Props.domProps\n```\nGo to: [Type definition](command:rescript-vscode.go_to_location?%5B%22ReactDOM_V3.res%22%2C57%2C2%5D)\n\n\n---\n\n```\n \n```\n```rescript\ntype React.element = PervasivesU.Jsx.element\n```\nGo to: [Type definition](command:rescript-vscode.go_to_location?%5B%22React.res%22%2C0%2C0%5D)\n"}} Complete src/Div.res 3:17 posCursor:[3:17] posNoWhite:[3:16] Found expr:[3:4->3:17] diff --git a/analysis/tests/src/expected/Fragment.res.txt b/analysis/tests/src/expected/Fragment.res.txt index d80d1c56a..5e978621c 100644 --- a/analysis/tests/src/expected/Fragment.res.txt +++ b/analysis/tests/src/expected/Fragment.res.txt @@ -1,7 +1,7 @@ Hover src/Fragment.res 6:19 getLocItem #4: heuristic for within fragments: take make as makeProps does not work the type is not great but jump to definition works -{"contents": {"kind": "markdown", "value": "```rescript\nReact.component<{\"children\": Jsx.element}>\n```\n\n---\n\n```\n \n```\n```rescript\ntype React.component<'props> = Jsx.component<'props>\n```\nGo to: [Type definition](command:rescript-vscode.go_to_location?%5B%22React.res%22%2C12%2C0%5D)\n"}} +{"contents": {"kind": "markdown", "value": "```rescript\nReact.component<{\"children\": PervasivesU.Jsx.element}>\n```\n\n---\n\n```\n \n```\n```rescript\ntype React.component<'props> = PervasivesU.Jsx.component<\n 'props,\n>\n```\nGo to: [Type definition](command:rescript-vscode.go_to_location?%5B%22React.res%22%2C12%2C0%5D)\n"}} Hover src/Fragment.res 9:56 Nothing at that position. Now trying to use completion. diff --git a/analysis/tests/src/expected/Hover.res.txt b/analysis/tests/src/expected/Hover.res.txt index e56cbe0f2..fac333e48 100644 --- a/analysis/tests/src/expected/Hover.res.txt +++ b/analysis/tests/src/expected/Hover.res.txt @@ -8,10 +8,10 @@ Hover src/Hover.res 6:7 {"contents": {"kind": "markdown", "value": "```rescript\nmodule Id: {\n type x = int\n}\n```"}} Hover src/Hover.res 19:11 -{"contents": {"kind": "markdown", "value": "\nThis module is commented\n```rescript\nmodule Dep: {\n let customDouble: int => int\n}\n```"}} +{"contents": {"kind": "markdown", "value": "\nThis module is commented\n```rescript\nmodule Dep: {\n let customDouble: (. int) => int\n}\n```"}} Hover src/Hover.res 22:11 -{"contents": {"kind": "markdown", "value": "```rescript\nint => int\n```\n\nSome doc comment"}} +{"contents": {"kind": "markdown", "value": "```rescript\n(. int) => int\n```\n\nSome doc comment"}} Hover src/Hover.res 26:6 getLocItem #8: heuristic for JSX with at most one child @@ -19,7 +19,7 @@ heuristic for: [makeProps, make, createElement], give the loc of `make` {"contents": {"kind": "markdown", "value": "```rescript\nint\n```"}} Hover src/Hover.res 33:4 -{"contents": {"kind": "markdown", "value": "```rescript\nunit => int\n```\n\nDoc comment for functionWithTypeAnnotation"}} +{"contents": {"kind": "markdown", "value": "```rescript\n(. unit) => int\n```\n\nDoc comment for functionWithTypeAnnotation"}} Hover src/Hover.res 37:13 getLocItem #5: heuristic for JSX and compiler combined: @@ -41,10 +41,10 @@ Hover src/Hover.res 46:10 {"contents": {"kind": "markdown", "value": "```rescript\nint\n```"}} Hover src/Hover.res 49:13 -{"contents": {"kind": "markdown", "value": "```rescript\nmodule type Logger = {\n let log: string => unit\n}\n```"}} +{"contents": {"kind": "markdown", "value": "```rescript\nmodule type Logger = {\n let log: (. string) => unit\n}\n```"}} Hover src/Hover.res 54:7 -{"contents": {"kind": "markdown", "value": "```rescript\nmodule type Logger = {\n let log: string => unit\n}\n```"}} +{"contents": {"kind": "markdown", "value": "```rescript\nmodule type Logger = {\n let log: (. string) => unit\n}\n```"}} Definition src/Hover.res 60:14 {"uri": "Hover.res", "range": {"start": {"line": 49, "character": 12}, "end": {"line": 49, "character": 18}}} @@ -77,10 +77,10 @@ Hover src/Hover.res 106:21 {"contents": {"kind": "markdown", "value": "```rescript\nint\n```"}} Hover src/Hover.res 116:16 -{"contents": {"kind": "markdown", "value": "```rescript\nAA.cond<[< #str(string)]> => AA.cond<[< #str(string)]>\n```\n\n---\n\n```\n \n```\n```rescript\ntype AA.cond<'a> = 'a\n constraint 'a = [< #str(string)]\n```\nGo to: [Type definition](command:rescript-vscode.go_to_location?%5B%22Hover.res%22%2C110%2C2%5D)\n"}} +{"contents": {"kind": "markdown", "value": "```rescript\n(. AA.cond<[< #str(string)]>) => AA.cond<[< #str(string)]>\n```\n\n---\n\n```\n \n```\n```rescript\ntype AA.cond<'a> = 'a\n constraint 'a = [< #str(string)]\n```\nGo to: [Type definition](command:rescript-vscode.go_to_location?%5B%22Hover.res%22%2C110%2C2%5D)\n"}} Hover src/Hover.res 119:25 -{"contents": {"kind": "markdown", "value": "```rescript\nAA.cond<[< #str(string)]> => AA.cond<[< #str(string)]>\n```\n\n---\n\n```\n \n```\n```rescript\ntype AA.cond<'a> = 'a\n constraint 'a = [< #str(string)]\n```\nGo to: [Type definition](command:rescript-vscode.go_to_location?%5B%22Hover.res%22%2C110%2C2%5D)\n"}} +{"contents": {"kind": "markdown", "value": "```rescript\n(. AA.cond<[< #str(string)]>) => AA.cond<[< #str(string)]>\n```\n\n---\n\n```\n \n```\n```rescript\ntype AA.cond<'a> = 'a\n constraint 'a = [< #str(string)]\n```\nGo to: [Type definition](command:rescript-vscode.go_to_location?%5B%22Hover.res%22%2C110%2C2%5D)\n"}} Hover src/Hover.res 122:3 Nothing at that position. Now trying to use completion. @@ -91,16 +91,16 @@ Resolved opens 1 pervasives {"contents": {"kind": "markdown", "value": "The `@live` decorator is for reanalyze, a static analysis tool for ReScript that can do dead code analysis.\n\n`@live` tells the dead code analysis that the value should be considered live, even though it might appear to be dead. This is typically used in case of FFI where there are indirect ways to access values. It can be added to everything that could otherwise be considered unused by the dead code analysis - values, functions, arguments, records, individual record fields, and so on.\n\n[Read more and see examples in the documentation](https://rescript-lang.org/syntax-lookup#live-decorator).\n\nHint: Did you know you can run an interactive code analysis in your project by running the command `> ReScript: Start Code Analyzer`? Try it!"}} Hover src/Hover.res 125:4 -{"contents": {"kind": "markdown", "value": "```rescript\n(. unit, unit) => int\n```"}} +{"contents": {"kind": "markdown", "value": "```rescript\n(. unit) => (. unit) => int\n```"}} Hover src/Hover.res 131:4 -{"contents": {"kind": "markdown", "value": "```rescript\n(. unit) => (. unit) => int\n```"}} +{"contents": {"kind": "markdown", "value": "```rescript\n(. unit, unit) => int\n```"}} Hover src/Hover.res 134:4 {"contents": {"kind": "markdown", "value": "```rescript\n(. unit, unit) => int\n```"}} Hover src/Hover.res 137:5 -{"contents": {"kind": "markdown", "value": "```rescript\n(. unit, unit) => int\n```"}} +{"contents": {"kind": "markdown", "value": "```rescript\n(. unit) => (. unit) => int\n```"}} Hover src/Hover.res 144:9 {"contents": {"kind": "markdown", "value": "```rescript\nint\n```\n\ndoc comment 1"}} @@ -187,7 +187,7 @@ Path y2 }] Hover src/Hover.res 197:4 -{"contents": {"kind": "markdown", "value": "```rescript\nCompV4.props => React.element\n```\n\n---\n\n```\n \n```\n```rescript\ntype CompV4.props<'n, 's> = {n?: 'n, s: 's}\n```\nGo to: [Type definition](command:rescript-vscode.go_to_location?%5B%22Hover.res%22%2C190%2C2%5D)\n\n\n---\n\n```\n \n```\n```rescript\ntype React.element = Jsx.element\n```\nGo to: [Type definition](command:rescript-vscode.go_to_location?%5B%22React.res%22%2C0%2C0%5D)\n"}} +{"contents": {"kind": "markdown", "value": "```rescript\n(. CompV4.props) => React.element\n```\n\n---\n\n```\n \n```\n```rescript\ntype CompV4.props<'n, 's> = {n?: 'n, s: 's}\n```\nGo to: [Type definition](command:rescript-vscode.go_to_location?%5B%22Hover.res%22%2C190%2C2%5D)\n\n\n---\n\n```\n \n```\n```rescript\ntype React.element = PervasivesU.Jsx.element\n```\nGo to: [Type definition](command:rescript-vscode.go_to_location?%5B%22React.res%22%2C0%2C0%5D)\n"}} Hover src/Hover.res 202:16 {"contents": {"kind": "markdown", "value": "```rescript\nuseR\n```\n\n---\n\n```\n \n```\n```rescript\ntype useR = {x: int, y: list>>}\n```\nGo to: [Type definition](command:rescript-vscode.go_to_location?%5B%22Hover.res%22%2C200%2C0%5D)\n\n\n---\n\n```\n \n```\n```rescript\ntype r<'a> = {i: 'a, f: float}\n```\nGo to: [Type definition](command:rescript-vscode.go_to_location?%5B%22Hover.res%22%2C101%2C0%5D)\n"}} diff --git a/analysis/tests/src/expected/Jsx2.res.txt b/analysis/tests/src/expected/Jsx2.res.txt index b6f0c10e3..9d8d57585 100644 --- a/analysis/tests/src/expected/Jsx2.res.txt +++ b/analysis/tests/src/expected/Jsx2.res.txt @@ -20,19 +20,7 @@ Completable: Cjsx([M], f, [second, f]) Package opens Pervasives.JsxModules.place holder Resolved opens 1 pervasives Path M.make -[{ - "label": "first", - "kind": 4, - "tags": [], - "detail": "string", - "documentation": null - }, { - "label": "fun", - "kind": 4, - "tags": [], - "detail": "option", - "documentation": null - }] +[] Complete src/Jsx2.res 14:13 posCursor:[14:13] posNoWhite:[14:12] Found expr:[14:12->14:13] @@ -75,13 +63,7 @@ Completable: Cjsx([M], k, [prop, k]) Package opens Pervasives.JsxModules.place holder Resolved opens 1 pervasives Path M.make -[{ - "label": "key", - "kind": 4, - "tags": [], - "detail": "string", - "documentation": null - }] +[] Complete src/Jsx2.res 25:17 posCursor:[25:17] posNoWhite:[25:16] Found expr:[25:4->25:17] @@ -90,13 +72,7 @@ Completable: Cjsx([M], k, [prop, k]) Package opens Pervasives.JsxModules.place holder Resolved opens 1 pervasives Path M.make -[{ - "label": "key", - "kind": 4, - "tags": [], - "detail": "string", - "documentation": null - }] +[] Complete src/Jsx2.res 28:21 posCursor:[28:21] posNoWhite:[28:20] Found expr:[28:4->28:21] @@ -105,13 +81,7 @@ Completable: Cjsx([M], k, [prop, k]) Package opens Pervasives.JsxModules.place holder Resolved opens 1 pervasives Path M.make -[{ - "label": "key", - "kind": 4, - "tags": [], - "detail": "string", - "documentation": null - }] +[] Complete src/Jsx2.res 31:24 posCursor:[31:24] posNoWhite:[31:23] Found expr:[31:4->31:24] @@ -120,13 +90,7 @@ Completable: Cjsx([M], k, [prop, k]) Package opens Pervasives.JsxModules.place holder Resolved opens 1 pervasives Path M.make -[{ - "label": "key", - "kind": 4, - "tags": [], - "detail": "string", - "documentation": null - }] +[] Complete src/Jsx2.res 34:18 posCursor:[34:18] posNoWhite:[34:17] Found expr:[34:4->34:18] @@ -135,13 +99,7 @@ Completable: Cjsx([M], k, [prop, k]) Package opens Pervasives.JsxModules.place holder Resolved opens 1 pervasives Path M.make -[{ - "label": "key", - "kind": 4, - "tags": [], - "detail": "string", - "documentation": null - }] +[] Complete src/Jsx2.res 37:16 posCursor:[37:16] posNoWhite:[37:15] Found expr:[37:4->37:16] @@ -150,13 +108,7 @@ Completable: Cjsx([M], k, [prop, k]) Package opens Pervasives.JsxModules.place holder Resolved opens 1 pervasives Path M.make -[{ - "label": "key", - "kind": 4, - "tags": [], - "detail": "string", - "documentation": null - }] +[] Complete src/Jsx2.res 40:17 posCursor:[40:17] posNoWhite:[40:16] Found expr:[40:4->40:17] @@ -165,13 +117,7 @@ Completable: Cjsx([M], k, [prop, k]) Package opens Pervasives.JsxModules.place holder Resolved opens 1 pervasives Path M.make -[{ - "label": "key", - "kind": 4, - "tags": [], - "detail": "string", - "documentation": null - }] +[] Complete src/Jsx2.res 43:18 posCursor:[43:18] posNoWhite:[43:17] Found expr:[43:4->43:18] @@ -180,13 +126,7 @@ Completable: Cjsx([M], k, [prop, k]) Package opens Pervasives.JsxModules.place holder Resolved opens 1 pervasives Path M.make -[{ - "label": "key", - "kind": 4, - "tags": [], - "detail": "string", - "documentation": null - }] +[] Complete src/Jsx2.res 46:16 posCursor:[46:16] posNoWhite:[46:15] Found expr:[46:4->46:16] @@ -195,13 +135,7 @@ Completable: Cjsx([M], k, [prop, k]) Package opens Pervasives.JsxModules.place holder Resolved opens 1 pervasives Path M.make -[{ - "label": "key", - "kind": 4, - "tags": [], - "detail": "string", - "documentation": null - }] +[] Complete src/Jsx2.res 49:27 posCursor:[49:27] posNoWhite:[49:26] Found expr:[49:4->49:27] @@ -210,13 +144,7 @@ Completable: Cjsx([M], k, [prop, k]) Package opens Pervasives.JsxModules.place holder Resolved opens 1 pervasives Path M.make -[{ - "label": "key", - "kind": 4, - "tags": [], - "detail": "string", - "documentation": null - }] +[] Complete src/Jsx2.res 52:38 posCursor:[52:38] posNoWhite:[52:37] Found expr:[52:4->52:38] @@ -225,13 +153,7 @@ Completable: Cjsx([M], k, [prop, k]) Package opens Pervasives.JsxModules.place holder Resolved opens 1 pervasives Path M.make -[{ - "label": "key", - "kind": 4, - "tags": [], - "detail": "string", - "documentation": null - }] +[] Complete src/Jsx2.res 55:25 posCursor:[55:25] posNoWhite:[55:24] Found expr:[55:4->55:25] @@ -240,13 +162,7 @@ Completable: Cjsx([M], k, [prop, k]) Package opens Pervasives.JsxModules.place holder Resolved opens 1 pervasives Path M.make -[{ - "label": "key", - "kind": 4, - "tags": [], - "detail": "string", - "documentation": null - }] +[] Definition src/Jsx2.res 58:11 getLocItem #4: heuristic for within fragments: take make as makeProps does not work @@ -284,13 +200,7 @@ Completable: Cjsx([M], k, [first, k]) Package opens Pervasives.JsxModules.place holder Resolved opens 1 pervasives Path M.make -[{ - "label": "key", - "kind": 4, - "tags": [], - "detail": "string", - "documentation": null - }] +[] Complete src/Jsx2.res 77:23 posCursor:[77:23] posNoWhite:[77:22] Found expr:[77:4->77:23] @@ -299,13 +209,7 @@ Completable: Cjsx([M], k, [first, k]) Package opens Pervasives.JsxModules.place holder Resolved opens 1 pervasives Path M.make -[{ - "label": "key", - "kind": 4, - "tags": [], - "detail": "string", - "documentation": null - }] +[] Complete src/Jsx2.res 80:6 posCursor:[80:6] posNoWhite:[80:5] Found expr:[80:4->85:69] @@ -347,13 +251,7 @@ Completable: Cjsx([WithChildren], n, [n]) Package opens Pervasives.JsxModules.place holder Resolved opens 1 pervasives Path WithChildren.make -[{ - "label": "name", - "kind": 4, - "tags": [], - "detail": "string", - "documentation": null - }] +[] Complete src/Jsx2.res 94:18 posCursor:[94:18] posNoWhite:[94:17] Found pattern:[94:7->94:18] @@ -368,7 +266,7 @@ Path React.e "label": "element", "kind": 22, "tags": [], - "detail": "type element = Jsx.element", + "detail": "type element = PervasivesU.Jsx.element", "documentation": null }] @@ -526,7 +424,7 @@ Completable: Cjsx([Comp], age, [age]) Package opens Pervasives.JsxModules.place holder Resolved opens 1 pervasives Path Comp.make -{"contents": {"kind": "markdown", "value": "```rescript\nint\n```"}} +null Hover src/Jsx2.res 167:16 Nothing at that position. Now trying to use completion. @@ -542,5 +440,5 @@ Completable: Cjsx([Comp], age, [age]) Package opens Pervasives.JsxModules.place holder Resolved opens 1 pervasives Path Comp.make -{"contents": {"kind": "markdown", "value": "```rescript\nint\n```"}} +null diff --git a/analysis/tests/src/expected/Jsx2.resi.txt b/analysis/tests/src/expected/Jsx2.resi.txt index 1dc85a0e9..92986b710 100644 --- a/analysis/tests/src/expected/Jsx2.resi.txt +++ b/analysis/tests/src/expected/Jsx2.resi.txt @@ -18,7 +18,7 @@ Path React.e "label": "element", "kind": 22, "tags": [], - "detail": "type element = Jsx.element", + "detail": "type element = PervasivesU.Jsx.element", "documentation": null }] @@ -34,7 +34,7 @@ Path React.e "label": "element", "kind": 22, "tags": [], - "detail": "type element = Jsx.element", + "detail": "type element = PervasivesU.Jsx.element", "documentation": null }] diff --git a/analysis/tests/src/expected/JsxV4.res.txt b/analysis/tests/src/expected/JsxV4.res.txt index 9c9bb9d37..5443c809b 100644 --- a/analysis/tests/src/expected/JsxV4.res.txt +++ b/analysis/tests/src/expected/JsxV4.res.txt @@ -8,28 +8,22 @@ Completable: Cjsx([M4], f, [first, f]) Package opens Pervasives.JsxModules.place holder Resolved opens 1 pervasives Path M4.make -[{ - "label": "fun", - "kind": 4, - "tags": [], - "detail": "option", - "documentation": null - }] +[] Hover src/JsxV4.res 14:9 -{"contents": {"kind": "markdown", "value": "```rescript\nReact.component>\n```\n\n---\n\n```\n \n```\n```rescript\ntype React.component<'props> = Jsx.component<'props>\n```\nGo to: [Type definition](command:rescript-vscode.go_to_location?%5B%22React.res%22%2C12%2C0%5D)\n\n\n---\n\n```\n \n```\n```rescript\ntype M4.props<'first, 'fun, 'second> = {\n first: 'first,\n fun?: 'fun,\n second?: 'second,\n}\n```\nGo to: [Type definition](command:rescript-vscode.go_to_location?%5B%22JsxV4.res%22%2C3%2C2%5D)\n\n\n Doc Comment For M4 "}} +{"contents": {"kind": "markdown", "value": "```rescript\nReact.component>\n```\n\n---\n\n```\n \n```\n```rescript\ntype React.component<'props> = PervasivesU.Jsx.component<\n 'props,\n>\n```\nGo to: [Type definition](command:rescript-vscode.go_to_location?%5B%22React.res%22%2C12%2C0%5D)\n\n\n---\n\n```\n \n```\n```rescript\ntype M4.props<'first, 'fun, 'second> = {\n first: 'first,\n fun?: 'fun,\n second?: 'second,\n}\n```\nGo to: [Type definition](command:rescript-vscode.go_to_location?%5B%22JsxV4.res%22%2C3%2C2%5D)\n\n\n Doc Comment For M4 "}} Create Interface src/JsxV4.res module M4: { - @react.component - let make: (~first: string, ~fun: string=?, ~second: string=?) => React.element + type props<'first, 'fun, 'second> = {first: 'first, fun?: 'fun, second?: 'second} + let make: (. props) => React.element } module MM: { - @react.component - let make: unit => React.element + type props = {} + let make: (. props) => React.element } module Other: { - @react.component - let make: (~name: string) => React.element + type props<'name> = {name: 'name} + let make: (. props) => React.element } diff --git a/analysis/tests/src/expected/RecModules.res.txt b/analysis/tests/src/expected/RecModules.res.txt index 62e3e825c..11104beb5 100644 --- a/analysis/tests/src/expected/RecModules.res.txt +++ b/analysis/tests/src/expected/RecModules.res.txt @@ -1,6 +1,6 @@ Hover src/RecModules.res 18:12 -{"contents": {"kind": "markdown", "value": "```rescript\nmodule C: {\n type t\n let createA: t => A.t\n}\n```"}} +{"contents": {"kind": "markdown", "value": "```rescript\nmodule C: {\n type t\n let createA: (. t) => A.t\n}\n```"}} Hover src/RecModules.res 20:12 -{"contents": {"kind": "markdown", "value": "```rescript\nmodule A: {\n type t\n let child: t => B.t\n}\n```"}} +{"contents": {"kind": "markdown", "value": "```rescript\nmodule A: {\n type t\n let child: (. t) => B.t\n}\n```"}} diff --git a/analysis/tests/src/expected/SignatureHelp.res.txt b/analysis/tests/src/expected/SignatureHelp.res.txt index 2dd482881..f9f9575ef 100644 --- a/analysis/tests/src/expected/SignatureHelp.res.txt +++ b/analysis/tests/src/expected/SignatureHelp.res.txt @@ -10,12 +10,11 @@ ContextPath Value[someFunc] Path someFunc argAtCursor: unlabelled<0> extracted params: -[( - int, ~two: string=?, ~three: unit => unit, ~four: someVariant, unit] +[] { "signatures": [{ - "label": "(\n int,\n ~two: string=?,\n ~three: unit => unit,\n ~four: someVariant,\n unit,\n) => unit", - "parameters": [{"label": [0, 7], "documentation": {"kind": "markdown", "value": "```rescript\nint\n```"}}, {"label": [11, 25], "documentation": {"kind": "markdown", "value": "```rescript\noption\n```"}}, {"label": [29, 49], "documentation": {"kind": "markdown", "value": ""}}, {"label": [53, 71], "documentation": {"kind": "markdown", "value": "```rescript\nsomeVariant\n```\n```rescript\ntype someVariant = One | Two | Three\n```\nGo to: [Type definition](command:rescript-vscode.go_to_location?%5B%22SignatureHelp.res%22%2C0%2C0%5D)"}}, {"label": [75, 79], "documentation": {"kind": "markdown", "value": "```rescript\nint\n```"}}], + "label": "(.\n int,\n ~two: string=?,\n ~three: (. unit) => unit,\n ~four: someVariant,\n unit,\n) => unit", + "parameters": [], "documentation": {"kind": "markdown", "value": " Does stuff. "} }], "activeSignature": 0, @@ -34,12 +33,11 @@ ContextPath Value[someFunc] Path someFunc argAtCursor: unlabelled<0> extracted params: -[( - int, ~two: string=?, ~three: unit => unit, ~four: someVariant, unit] +[] { "signatures": [{ - "label": "(\n int,\n ~two: string=?,\n ~three: unit => unit,\n ~four: someVariant,\n unit,\n) => unit", - "parameters": [{"label": [0, 7], "documentation": {"kind": "markdown", "value": "```rescript\nint\n```"}}, {"label": [11, 25], "documentation": {"kind": "markdown", "value": "```rescript\noption\n```"}}, {"label": [29, 49], "documentation": {"kind": "markdown", "value": ""}}, {"label": [53, 71], "documentation": {"kind": "markdown", "value": "```rescript\nsomeVariant\n```\n```rescript\ntype someVariant = One | Two | Three\n```\nGo to: [Type definition](command:rescript-vscode.go_to_location?%5B%22SignatureHelp.res%22%2C0%2C0%5D)"}}, {"label": [75, 79], "documentation": {"kind": "markdown", "value": "```rescript\nint\n```"}}], + "label": "(.\n int,\n ~two: string=?,\n ~three: (. unit) => unit,\n ~four: someVariant,\n unit,\n) => unit", + "parameters": [], "documentation": {"kind": "markdown", "value": " Does stuff. "} }], "activeSignature": 0, @@ -58,12 +56,11 @@ ContextPath Value[someFunc] Path someFunc argAtCursor: ~two extracted params: -[( - int, ~two: string=?, ~three: unit => unit, ~four: someVariant, unit] +[] { "signatures": [{ - "label": "(\n int,\n ~two: string=?,\n ~three: unit => unit,\n ~four: someVariant,\n unit,\n) => unit", - "parameters": [{"label": [0, 7], "documentation": {"kind": "markdown", "value": "```rescript\nint\n```"}}, {"label": [11, 25], "documentation": {"kind": "markdown", "value": "```rescript\noption\n```"}}, {"label": [29, 49], "documentation": {"kind": "markdown", "value": ""}}, {"label": [53, 71], "documentation": {"kind": "markdown", "value": "```rescript\nsomeVariant\n```\n```rescript\ntype someVariant = One | Two | Three\n```\nGo to: [Type definition](command:rescript-vscode.go_to_location?%5B%22SignatureHelp.res%22%2C0%2C0%5D)"}}, {"label": [75, 79], "documentation": {"kind": "markdown", "value": "```rescript\nint\n```"}}], + "label": "(.\n int,\n ~two: string=?,\n ~three: (. unit) => unit,\n ~four: someVariant,\n unit,\n) => unit", + "parameters": [], "documentation": {"kind": "markdown", "value": " Does stuff. "} }], "activeSignature": 0, @@ -82,12 +79,11 @@ ContextPath Value[someFunc] Path someFunc argAtCursor: ~two extracted params: -[( - int, ~two: string=?, ~three: unit => unit, ~four: someVariant, unit] +[] { "signatures": [{ - "label": "(\n int,\n ~two: string=?,\n ~three: unit => unit,\n ~four: someVariant,\n unit,\n) => unit", - "parameters": [{"label": [0, 7], "documentation": {"kind": "markdown", "value": "```rescript\nint\n```"}}, {"label": [11, 25], "documentation": {"kind": "markdown", "value": "```rescript\noption\n```"}}, {"label": [29, 49], "documentation": {"kind": "markdown", "value": ""}}, {"label": [53, 71], "documentation": {"kind": "markdown", "value": "```rescript\nsomeVariant\n```\n```rescript\ntype someVariant = One | Two | Three\n```\nGo to: [Type definition](command:rescript-vscode.go_to_location?%5B%22SignatureHelp.res%22%2C0%2C0%5D)"}}, {"label": [75, 79], "documentation": {"kind": "markdown", "value": "```rescript\nint\n```"}}], + "label": "(.\n int,\n ~two: string=?,\n ~three: (. unit) => unit,\n ~four: someVariant,\n unit,\n) => unit", + "parameters": [], "documentation": {"kind": "markdown", "value": " Does stuff. "} }], "activeSignature": 0, @@ -106,12 +102,11 @@ ContextPath Value[someFunc] Path someFunc argAtCursor: ~four extracted params: -[( - int, ~two: string=?, ~three: unit => unit, ~four: someVariant, unit] +[] { "signatures": [{ - "label": "(\n int,\n ~two: string=?,\n ~three: unit => unit,\n ~four: someVariant,\n unit,\n) => unit", - "parameters": [{"label": [0, 7], "documentation": {"kind": "markdown", "value": "```rescript\nint\n```"}}, {"label": [11, 25], "documentation": {"kind": "markdown", "value": "```rescript\noption\n```"}}, {"label": [29, 49], "documentation": {"kind": "markdown", "value": ""}}, {"label": [53, 71], "documentation": {"kind": "markdown", "value": "```rescript\nsomeVariant\n```\n```rescript\ntype someVariant = One | Two | Three\n```\nGo to: [Type definition](command:rescript-vscode.go_to_location?%5B%22SignatureHelp.res%22%2C0%2C0%5D)"}}, {"label": [75, 79], "documentation": {"kind": "markdown", "value": "```rescript\nint\n```"}}], + "label": "(.\n int,\n ~two: string=?,\n ~three: (. unit) => unit,\n ~four: someVariant,\n unit,\n) => unit", + "parameters": [], "documentation": {"kind": "markdown", "value": " Does stuff. "} }], "activeSignature": 0, @@ -130,12 +125,11 @@ ContextPath Value[someFunc] Path someFunc argAtCursor: ~four extracted params: -[( - int, ~two: string=?, ~three: unit => unit, ~four: someVariant, unit] +[] { "signatures": [{ - "label": "(\n int,\n ~two: string=?,\n ~three: unit => unit,\n ~four: someVariant,\n unit,\n) => unit", - "parameters": [{"label": [0, 7], "documentation": {"kind": "markdown", "value": "```rescript\nint\n```"}}, {"label": [11, 25], "documentation": {"kind": "markdown", "value": "```rescript\noption\n```"}}, {"label": [29, 49], "documentation": {"kind": "markdown", "value": ""}}, {"label": [53, 71], "documentation": {"kind": "markdown", "value": "```rescript\nsomeVariant\n```\n```rescript\ntype someVariant = One | Two | Three\n```\nGo to: [Type definition](command:rescript-vscode.go_to_location?%5B%22SignatureHelp.res%22%2C0%2C0%5D)"}}, {"label": [75, 79], "documentation": {"kind": "markdown", "value": "```rescript\nint\n```"}}], + "label": "(.\n int,\n ~two: string=?,\n ~three: (. unit) => unit,\n ~four: someVariant,\n unit,\n) => unit", + "parameters": [], "documentation": {"kind": "markdown", "value": " Does stuff. "} }], "activeSignature": 0, @@ -154,11 +148,11 @@ ContextPath Value[otherFunc] Path otherFunc argAtCursor: unlabelled<0> extracted params: -[(string, int, float] +[] { "signatures": [{ - "label": "(string, int, float) => unit", - "parameters": [{"label": [0, 7], "documentation": {"kind": "markdown", "value": "```rescript\nstring\n```"}}, {"label": [9, 12], "documentation": {"kind": "markdown", "value": "```rescript\nstring\n```"}}, {"label": [14, 19], "documentation": {"kind": "markdown", "value": "```rescript\nstring\n```"}}] + "label": "(. string, int, float) => unit", + "parameters": [] }], "activeSignature": 0, "activeParameter": 0 @@ -176,11 +170,11 @@ ContextPath Value[otherFunc] Path otherFunc argAtCursor: unlabelled<0> extracted params: -[(string, int, float] +[] { "signatures": [{ - "label": "(string, int, float) => unit", - "parameters": [{"label": [0, 7], "documentation": {"kind": "markdown", "value": "```rescript\nstring\n```"}}, {"label": [9, 12], "documentation": {"kind": "markdown", "value": "```rescript\nstring\n```"}}, {"label": [14, 19], "documentation": {"kind": "markdown", "value": "```rescript\nstring\n```"}}] + "label": "(. string, int, float) => unit", + "parameters": [] }], "activeSignature": 0, "activeParameter": 0 @@ -198,11 +192,11 @@ ContextPath Value[otherFunc] Path otherFunc argAtCursor: unlabelled<2> extracted params: -[(string, int, float] +[] { "signatures": [{ - "label": "(string, int, float) => unit", - "parameters": [{"label": [0, 7], "documentation": {"kind": "markdown", "value": "```rescript\nstring\n```"}}, {"label": [9, 12], "documentation": {"kind": "markdown", "value": "```rescript\nstring\n```"}}, {"label": [14, 19], "documentation": {"kind": "markdown", "value": "```rescript\nstring\n```"}}] + "label": "(. string, int, float) => unit", + "parameters": [] }], "activeSignature": 0, "activeParameter": 2 @@ -220,11 +214,11 @@ ContextPath Value[Completion, Lib, foo] Path Completion.Lib.foo argAtCursor: ~age extracted params: -[(~age: int, ~name: string] +[] { "signatures": [{ - "label": "(~age: int, ~name: string) => string", - "parameters": [{"label": [0, 10], "documentation": {"kind": "markdown", "value": "```rescript\nint\n```"}}, {"label": [12, 25], "documentation": {"kind": "markdown", "value": "```rescript\nstring\n```"}}] + "label": "(. ~age: int, ~name: string) => string", + "parameters": [] }], "activeSignature": 0, "activeParameter": 0 @@ -242,11 +236,11 @@ ContextPath Value[iAmSoSpecial] Path iAmSoSpecial argAtCursor: unlabelled<0> extracted params: -[string] +[] { "signatures": [{ - "label": "string => unit", - "parameters": [{"label": [0, 6], "documentation": {"kind": "markdown", "value": "```rescript\nstring\n```"}}] + "label": "(. string) => unit", + "parameters": [] }], "activeSignature": 0, "activeParameter": 0 @@ -265,11 +259,11 @@ ContextPath Value[otherFunc] Path otherFunc argAtCursor: unlabelled<1> extracted params: -[(string, int, float] +[] { "signatures": [{ - "label": "(string, int, float) => unit", - "parameters": [{"label": [0, 7], "documentation": {"kind": "markdown", "value": "```rescript\nstring\n```"}}, {"label": [9, 12], "documentation": {"kind": "markdown", "value": "```rescript\nstring\n```"}}, {"label": [14, 19], "documentation": {"kind": "markdown", "value": "```rescript\nstring\n```"}}] + "label": "(. string, int, float) => unit", + "parameters": [] }], "activeSignature": 0, "activeParameter": 1 @@ -287,11 +281,11 @@ ContextPath Value[fn] Path fn argAtCursor: unlabelled<1> extracted params: -[(int, string, int] +[] { "signatures": [{ - "label": "(int, string, int) => unit", - "parameters": [{"label": [0, 4], "documentation": {"kind": "markdown", "value": "```rescript\nint\n```"}}, {"label": [6, 12], "documentation": {"kind": "markdown", "value": "```rescript\nint\n```"}}, {"label": [14, 17], "documentation": {"kind": "markdown", "value": "```rescript\nint\n```"}}] + "label": "(. int, string, int) => unit", + "parameters": [] }], "activeSignature": 0, "activeParameter": 1 @@ -309,11 +303,11 @@ ContextPath Value[fn] Path fn argAtCursor: unlabelled<1> extracted params: -[(int, string, int] +[] { "signatures": [{ - "label": "(int, string, int) => unit", - "parameters": [{"label": [0, 4], "documentation": {"kind": "markdown", "value": "```rescript\nint\n```"}}, {"label": [6, 12], "documentation": {"kind": "markdown", "value": "```rescript\nint\n```"}}, {"label": [14, 17], "documentation": {"kind": "markdown", "value": "```rescript\nint\n```"}}] + "label": "(. int, string, int) => unit", + "parameters": [] }], "activeSignature": 0, "activeParameter": 1 @@ -331,11 +325,11 @@ ContextPath Value[fn] Path fn argAtCursor: unlabelled<2> extracted params: -[(int, string, int] +[] { "signatures": [{ - "label": "(int, string, int) => unit", - "parameters": [{"label": [0, 4], "documentation": {"kind": "markdown", "value": "```rescript\nint\n```"}}, {"label": [6, 12], "documentation": {"kind": "markdown", "value": "```rescript\nint\n```"}}, {"label": [14, 17], "documentation": {"kind": "markdown", "value": "```rescript\nint\n```"}}] + "label": "(. int, string, int) => unit", + "parameters": [] }], "activeSignature": 0, "activeParameter": 2 @@ -355,11 +349,11 @@ ContextPath Value[iAmSoSpecial] Path iAmSoSpecial argAtCursor: unlabelled<0> extracted params: -[string] +[] { "signatures": [{ - "label": "string => unit", - "parameters": [{"label": [0, 6], "documentation": {"kind": "markdown", "value": "```rescript\nstring\n```"}}] + "label": "(. string) => unit", + "parameters": [] }], "activeSignature": 0, "activeParameter": 0 @@ -381,12 +375,11 @@ ContextPath Value[someFunc] Path someFunc argAtCursor: unlabelled<0> extracted params: -[( - int, ~two: string=?, ~three: unit => unit, ~four: someVariant, unit] +[] { "signatures": [{ - "label": "(\n int,\n ~two: string=?,\n ~three: unit => unit,\n ~four: someVariant,\n unit,\n) => unit", - "parameters": [{"label": [0, 7], "documentation": {"kind": "markdown", "value": "```rescript\nint\n```"}}, {"label": [11, 25], "documentation": {"kind": "markdown", "value": "```rescript\noption\n```"}}, {"label": [29, 49], "documentation": {"kind": "markdown", "value": ""}}, {"label": [53, 71], "documentation": {"kind": "markdown", "value": "```rescript\nsomeVariant\n```\n```rescript\ntype someVariant = One | Two | Three\n```\nGo to: [Type definition](command:rescript-vscode.go_to_location?%5B%22SignatureHelp.res%22%2C0%2C0%5D)"}}, {"label": [75, 79], "documentation": {"kind": "markdown", "value": "```rescript\nint\n```"}}], + "label": "(.\n int,\n ~two: string=?,\n ~three: (. unit) => unit,\n ~four: someVariant,\n unit,\n) => unit", + "parameters": [], "documentation": {"kind": "markdown", "value": " Does stuff. "} }], "activeSignature": 0,