From 8bbace5c61e69a7148883fbeee71824bff067105 Mon Sep 17 00:00:00 2001 From: Gabriel Nordeborn Date: Wed, 16 Aug 2023 22:31:03 +0200 Subject: [PATCH 01/11] various uncurried fixes --- analysis/src/CompletionBackEnd.ml | 16 +- analysis/src/CompletionFrontEnd.ml | 21 +- analysis/src/CompletionJsx.ml | 6 +- analysis/src/CreateInterface.ml | 8 +- analysis/src/Packages.ml | 6 +- analysis/src/TypeUtils.ml | 11 +- analysis/src/Xform.ml | 5 +- analysis/tests/bsconfig.json | 1 + analysis/tests/package-lock.json | 17 +- analysis/tests/package.json | 2 +- analysis/tests/src/expected/Auto.res.txt | 2 +- .../tests/src/expected/Completion.res.txt | 215 ++++++++++-------- .../expected/CompletionExpressions.res.txt | 24 +- .../CompletionFunctionArguments.res.txt | 4 + .../expected/CompletionInferValues.res.txt | 94 +++++--- .../tests/src/expected/CompletionJsx.res.txt | 70 +++--- .../src/expected/CompletionJsxProps.res.txt | 6 +- .../src/expected/CompletionPipeChain.res.txt | 8 +- .../expected/CompletionTypeAnnotation.res.txt | 2 +- .../src/expected/CreateInterface.res.txt | 2 +- analysis/tests/src/expected/Debug.res.txt | 8 +- .../tests/src/expected/Definition.res.txt | 6 +- .../tests/src/expected/Destructuring.res.txt | 4 + analysis/tests/src/expected/Hover.res.txt | 8 +- analysis/tests/src/expected/Jsx2.resi.txt | 2 +- analysis/tests/src/expected/JsxV4.res.txt | 6 +- .../src/expected/RecordCompletion.res.txt | 8 +- .../tests/src/expected/SignatureHelp.res.txt | 79 +++---- analysis/vendor/ml/printtyp.ml | 3 +- 29 files changed, 372 insertions(+), 272 deletions(-) diff --git a/analysis/src/CompletionBackEnd.ml b/analysis/src/CompletionBackEnd.ml index 3ca0b904c..2888a37b1 100644 --- a/analysis/src/CompletionBackEnd.ml +++ b/analysis/src/CompletionBackEnd.ml @@ -1133,7 +1133,14 @@ let getOpens ~debug ~rawOpens ~package ~env = if debug && packageOpens <> [] then Printf.printf "%s\n" ("Package opens " - ^ String.concat " " (packageOpens |> List.map pathToString)); + ^ String.concat " " + (packageOpens + |> List.map (fun p -> + p + |> List.map (fun name -> + (* Unify formatting between curried and uncurried *) + if name = "PervasivesU" then "Pervasives" else name) + |> pathToString))); let resolvedOpens = resolveOpens ~env (List.rev (packageOpens @ rawOpens)) ~package in @@ -1147,8 +1154,11 @@ let getOpens ~debug ~rawOpens ~package ~env = |> List.map (fun (e : QueryEnv.t) -> let name = Uri.toString e.file.uri in - if Utils.startsWith name "pervasives." then - Filename.chop_extension name + (* Unify formatting between curried and uncurried *) + if + name = "pervasives.res" || name = "pervasives.resi" + || name = "pervasivesU.res" || name = "pervasivesU.resi" + then "pervasives" else name))); (* Last open takes priority *) List.rev resolvedOpens diff --git a/analysis/src/CompletionFrontEnd.ml b/analysis/src/CompletionFrontEnd.ml index 797f28248..446c78c16 100644 --- a/analysis/src/CompletionFrontEnd.ml +++ b/analysis/src/CompletionFrontEnd.ml @@ -148,7 +148,7 @@ let rec exprToContextPath (e : Parsetree.expression) = (match exprs with | [] -> None | exp :: _ -> exprToContextPath exp)) - | Pexp_ident {txt = Lident "|."} -> None + | Pexp_ident {txt = Lident ("|." | "|.u")} -> None | Pexp_ident {txt} -> Some (CPId (Utils.flattenLongIdent txt, Value)) | Pexp_field (e1, {txt = Lident name}) -> ( match exprToContextPath e1 with @@ -162,7 +162,7 @@ let rec exprToContextPath (e : Parsetree.expression) = | None -> None | Some contexPath -> Some (CPObj (contexPath, txt))) | Pexp_apply - ( {pexp_desc = Pexp_ident {txt = Lident "|."}}, + ( {pexp_desc = Pexp_ident {txt = Lident ("|." | "|.u")}}, [ (_, lhs); (_, {pexp_desc = Pexp_apply (d, args); pexp_loc; pexp_attributes}); @@ -175,7 +175,7 @@ let rec exprToContextPath (e : Parsetree.expression) = pexp_attributes; } | Pexp_apply - ( {pexp_desc = Pexp_ident {txt = Lident "|."}}, + ( {pexp_desc = Pexp_ident {txt = Lident ("|." | "|.u")}}, [(_, lhs); (_, {pexp_desc = Pexp_ident id; pexp_loc; pexp_attributes})] ) -> (* Transform away pipe with identifier *) @@ -211,13 +211,13 @@ let completePipeChain (exp : Parsetree.expression) = (* When the left side of the pipe we're completing is a function application. Example: someArray->Js.Array2.map(v => v + 2)-> *) | Pexp_apply - ( {pexp_desc = Pexp_ident {txt = Lident "|."}}, + ( {pexp_desc = Pexp_ident {txt = Lident ("|." | "|.u")}}, [_; (_, {pexp_desc = Pexp_apply (d, _)})] ) -> exprToContextPath exp |> Option.map (fun ctxPath -> (ctxPath, d.pexp_loc)) (* When the left side of the pipe we're completing is an identifier application. Example: someArray->filterAllTheGoodStuff-> *) | Pexp_apply - ( {pexp_desc = Pexp_ident {txt = Lident "|."}}, + ( {pexp_desc = Pexp_ident {txt = Lident ("|." | "|.u")}}, [_; (_, {pexp_desc = Pexp_ident _; pexp_loc})] ) -> exprToContextPath exp |> Option.map (fun ctxPath -> (ctxPath, pexp_loc)) | _ -> None @@ -813,7 +813,7 @@ let completionWithParser1 ~currentFile ~debug ~offset ~path ~posCursor ~text = scope := oldScope); resetCurrentCtxPath oldCtxPath | Pexp_apply - ( {pexp_desc = Pexp_ident {txt = Lident "|."; loc = opLoc}}, + ( {pexp_desc = Pexp_ident {txt = Lident ("|." | "|.u"); loc = opLoc}}, [ (_, lhs); (_, {pexp_desc = Pexp_extension _; pexp_loc = {loc_ghost = true}}); @@ -911,7 +911,7 @@ let completionWithParser1 ~currentFile ~debug ~offset ~path ~posCursor ~text = | _ -> Cpath (CPId (compNamePath, Module))) else iterateJsxProps ~iterator jsxProps | Pexp_apply - ( {pexp_desc = Pexp_ident {txt = Lident "|."}}, + ( {pexp_desc = Pexp_ident {txt = Lident ("|." | "|.u")}}, [ (_, lhs); (_, {pexp_desc = Pexp_ident {txt = Longident.Lident id; loc}}); @@ -920,13 +920,13 @@ let completionWithParser1 ~currentFile ~debug ~offset ~path ~posCursor ~text = (* Case foo->id *) setPipeResult ~lhs ~id |> ignore | Pexp_apply - ( {pexp_desc = Pexp_ident {txt = Lident "|."; loc = opLoc}}, + ( {pexp_desc = Pexp_ident {txt = Lident ("|." | "|.u"); loc = opLoc}}, [(_, lhs); _] ) when Loc.end_ opLoc = posCursor -> (* Case foo-> *) setPipeResult ~lhs ~id:"" |> ignore | Pexp_apply - ( {pexp_desc = Pexp_ident {txt = Lident "|."}}, + ( {pexp_desc = Pexp_ident {txt = Lident ("|." | "|.u")}}, [_; (_, {pexp_desc = Pexp_apply (funExpr, args)})] ) when (* Normally named arg completion fires when the cursor is right after the expression. E.g in foo(~<---there @@ -957,7 +957,8 @@ let completionWithParser1 ~currentFile ~debug ~offset ~path ~posCursor ~text = argCompletable |> iterateFnArguments ~isPipe:true ~args ~iterator; resetCurrentCtxPath oldCtxPath) | Some argCompletable -> setResult argCompletable) - | Pexp_apply ({pexp_desc = Pexp_ident {txt = Lident "|."}}, [_; _]) -> + | Pexp_apply + ({pexp_desc = Pexp_ident {txt = Lident ("|." | "|.u")}}, [_; _]) -> (* Ignore any other pipe. *) () | Pexp_apply (funExpr, args) diff --git a/analysis/src/CompletionJsx.ml b/analysis/src/CompletionJsx.ml index aede04516..bf79e0401 100644 --- a/analysis/src/CompletionJsx.ml +++ b/analysis/src/CompletionJsx.ml @@ -731,7 +731,11 @@ let getJsxLabels ~componentPath ~findTypeOfValue ~package = in let rec getLabels (t : Types.type_expr) = match t.desc with - | Tlink t1 | Tsubst t1 | Tpoly (t1, []) -> getLabels t1 + | Tlink t1 + | Tsubst t1 + | Tpoly (t1, []) + | Tconstr (Pident {name = "function$"}, [t1; _], _) -> + getLabels t1 | Tarrow ( Nolabel, { diff --git a/analysis/src/CreateInterface.ml b/analysis/src/CreateInterface.ml index 25048d4e8..184dd604b 100644 --- a/analysis/src/CreateInterface.ml +++ b/analysis/src/CreateInterface.ml @@ -164,11 +164,13 @@ let printSignature ~extractor ~signature = let buf = Buffer.create 10 in - let getComponentTypeV3 (typ : Types.type_expr) = + let rec getComponentTypeV3 (typ : Types.type_expr) = let reactElement = Ctype.newconstr (Pdot (Pident (Ident.create "React"), "element", 0)) [] in match typ.desc with + | Tconstr (Pident {name = "function$"}, [typ; _], _) -> + getComponentTypeV3 typ | Tarrow (_, {desc = Tobject (tObj, _)}, retType, _) -> Some (tObj, retType) | Tconstr ( Pdot (Pident {name = "React"}, "component", _), @@ -183,11 +185,13 @@ let printSignature ~extractor ~signature = | _ -> None in - let getComponentTypeV4 (typ : Types.type_expr) = + let rec getComponentTypeV4 (typ : Types.type_expr) = let reactElement = Ctype.newconstr (Pdot (Pident (Ident.create "React"), "element", 0)) [] in match typ.desc with + | Tconstr (Pident {name = "function$"}, [typ; _], _) -> + getComponentTypeV4 typ | Tarrow (_, {desc = Tconstr (Path.Pident propsId, typeArgs, _)}, retType, _) when Ident.name propsId = "props" -> Some (typeArgs, retType) diff --git a/analysis/src/Packages.ml b/analysis/src/Packages.ml index afe8e19b6..0f4d9b497 100644 --- a/analysis/src/Packages.ml +++ b/analysis/src/Packages.ml @@ -82,7 +82,11 @@ let newBsPackage ~rootPath = | None -> [] in let opens = - ["Pervasives"; "JsxModules"] :: opens_from_namespace + [ + (if uncurried then "PervasivesU" else "Pervasives"); + "JsxModules"; + ] + :: opens_from_namespace |> List.rev_append opens_from_bsc_flags |> List.map (fun path -> path @ ["place holder"]) in diff --git a/analysis/src/TypeUtils.ml b/analysis/src/TypeUtils.ml index 856ca07f9..369630775 100644 --- a/analysis/src/TypeUtils.ml +++ b/analysis/src/TypeUtils.ml @@ -198,12 +198,14 @@ let getBuiltinFromTypePath path = | Path.Pident id when Ident.name id = "result" -> Some Result | Path.Pident id when Ident.name id = "lazy_t" -> Some Lazy | Path.Pident id when Ident.name id = "char" -> Some Char - | Pdot (Pident id, "result", _) when Ident.name id = "Pervasives" -> + | Pdot (Pident id, "result", _) + when Ident.name id = "Pervasives" || Ident.name id = "PervasivesU" -> Some Result | _ -> None -let pathFromTypeExpr (t : Types.type_expr) = +let rec pathFromTypeExpr (t : Types.type_expr) = match t.desc with + | Tconstr (Pident {name = "function$"}, [t; _], _) -> pathFromTypeExpr t | Tconstr (path, _typeArgs, _) | Tlink {desc = Tconstr (path, _typeArgs, _)} | Tsubst {desc = Tconstr (path, _typeArgs, _)} @@ -513,7 +515,10 @@ let getArgs ~env (t : Types.type_expr) ~full = let rec getArgsLoop ~env (t : Types.type_expr) ~full ~currentArgumentPosition = match t.desc with - | Tlink t1 | Tsubst t1 | Tpoly (t1, []) -> + | Tlink t1 + | Tsubst t1 + | Tpoly (t1, []) + | Tconstr (Pident {name = "function$"}, [t1; _], _) -> getArgsLoop ~full ~env ~currentArgumentPosition t1 | Tarrow (Labelled l, tArg, tRet, _) -> (SharedTypes.Completable.Labelled l, tArg) diff --git a/analysis/src/Xform.ml b/analysis/src/Xform.ml index 829b372a5..87166cad4 100644 --- a/analysis/src/Xform.ml +++ b/analysis/src/Xform.ml @@ -195,7 +195,10 @@ module AddTypeAnnotation = struct in let rec processFunction ~argNum (e : Parsetree.expression) = match e.pexp_desc with - | Pexp_fun (argLabel, _, pat, e) -> + | Pexp_fun (argLabel, _, pat, e) + | Pexp_construct + ( {txt = Lident "Function$"}, + Some {pexp_desc = Pexp_fun (argLabel, _, pat, e)} ) -> let isUnlabeledOnlyArg = argNum = 1 && argLabel = Nolabel && diff --git a/analysis/tests/bsconfig.json b/analysis/tests/bsconfig.json index a1380ab94..ab1c00f56 100644 --- a/analysis/tests/bsconfig.json +++ b/analysis/tests/bsconfig.json @@ -1,4 +1,5 @@ { + "uncurried": true, "name": "test", "reanalyze": { "analysis": ["dce"] diff --git a/analysis/tests/package-lock.json b/analysis/tests/package-lock.json index c1d438a87..7b85d6958 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-rc.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-rc.1", + "resolved": "https://registry.npmjs.org/rescript/-/rescript-11.0.0-rc.1.tgz", + "integrity": "sha512-NSeq8cKlHRyjyVhanJYDHkTruYH51HDmlc7Eal7foT97wUj6rOzP6F+dnE2JrC59yV6Xejqjb6i73aXSdaK6OQ==", "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-rc.1", + "resolved": "https://registry.npmjs.org/rescript/-/rescript-11.0.0-rc.1.tgz", + "integrity": "sha512-NSeq8cKlHRyjyVhanJYDHkTruYH51HDmlc7Eal7foT97wUj6rOzP6F+dnE2JrC59yV6Xejqjb6i73aXSdaK6OQ==" }, "scheduler": { "version": "0.23.0", diff --git a/analysis/tests/package.json b/analysis/tests/package.json index cb1651891..18b1ff7ed 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-rc.1" } } diff --git a/analysis/tests/src/expected/Auto.res.txt b/analysis/tests/src/expected/Auto.res.txt index eb9d540e2..79623569c 100644 --- a/analysis/tests/src/expected/Auto.res.txt +++ b/analysis/tests/src/expected/Auto.res.txt @@ -1,3 +1,3 @@ Hover src/Auto.res 2:13 -{"contents": {"kind": "markdown", "value": "```rescript\n(Belt.List.t<'a>, 'a => 'b) => Belt.List.t<'b>\n```\n\n---\n\n```\n \n```\n```rescript\ntype Belt.List.t<'a> = list<'a>\n```\nGo to: [Type definition](command:rescript-vscode.go_to_location?%5B%22belt_List.mli%22%2C34%2C0%5D)\n\n\n\n Returns a new list with `f` applied to each element of `someList`.\n\n ```res example\n list{1, 2}->Belt.List.map(x => x + 1) // list{3, 4}\n ```\n"}} +{"contents": {"kind": "markdown", "value": "```rescript\n(. Belt.List.t<'a>, (. 'a) => 'b) => Belt.List.t<'b>\n```\n\n---\n\n```\n \n```\n```rescript\ntype Belt.List.t<'a> = list<'a>\n```\nGo to: [Type definition](command:rescript-vscode.go_to_location?%5B%22belt_List.resi%22%2C35%2C0%5D)\n\n\n\n Returns a new list with `f` applied to each element of `someList`.\n\n ```res example\n list{1, 2}->Belt.List.map(x => x + 1) // list{3, 4}\n ```\n"}} diff --git a/analysis/tests/src/expected/Completion.res.txt b/analysis/tests/src/expected/Completion.res.txt index aef3b28be..0258455be 100644 --- a/analysis/tests/src/expected/Completion.res.txt +++ b/analysis/tests/src/expected/Completion.res.txt @@ -10,67 +10,67 @@ Path MyList.m "label": "mapReverse", "kind": 12, "tags": [], - "detail": "(t<'a>, 'a => 'b) => t<'b>", + "detail": "(. t<'a>, (. 'a) => 'b) => t<'b>", "documentation": {"kind": "markdown", "value": "\n Equivalent to:\n\n ```res\n map(someList, f)->reverse\n ```\n\n ```res example\n list{3, 4, 5}->Belt.List.mapReverse(x => x * x) /* list{25, 16, 9} */\n ```\n"} }, { "label": "makeBy", "kind": 12, "tags": [], - "detail": "(int, int => 'a) => t<'a>", + "detail": "(. int, (. int) => 'a) => t<'a>", "documentation": {"kind": "markdown", "value": "\nReturn a list of length `numItems` with element `i` initialized with `f(i)`.\nReturns an empty list if `numItems` is negative.\n\n```res example\nBelt.List.makeBy(5, i => i) // list{0, 1, 2, 3, 4}\n\nBelt.List.makeBy(5, i => i * i) // list{0, 1, 4, 9, 16}\n```\n"} }, { "label": "make", "kind": 12, "tags": [], - "detail": "(int, 'a) => t<'a>", + "detail": "(. int, 'a) => t<'a>", "documentation": {"kind": "markdown", "value": "\n Returns a list of length `numItems` with each element filled with value `v`. Returns an empty list if `numItems` is negative.\n\n ```res example\n Belt.List.make(3, 1) // list{1, 1, 1}\n ```\n"} }, { "label": "mapReverse2U", "kind": 12, "tags": [], - "detail": "(t<'a>, t<'b>, (. 'a, 'b) => 'c) => t<'c>", + "detail": "(. t<'a>, t<'b>, ('a, 'b) => 'c) => t<'c>", "documentation": {"kind": "markdown", "value": " Uncurried version of [mapReverse2](#mapReverse2). "} }, { "label": "map", "kind": 12, "tags": [], - "detail": "(t<'a>, 'a => 'b) => t<'b>", + "detail": "(. t<'a>, (. 'a) => 'b) => t<'b>", "documentation": {"kind": "markdown", "value": "\n Returns a new list with `f` applied to each element of `someList`.\n\n ```res example\n list{1, 2}->Belt.List.map(x => x + 1) // list{3, 4}\n ```\n"} }, { "label": "mapWithIndexU", "kind": 12, "tags": [], - "detail": "(t<'a>, (. int, 'a) => 'b) => t<'b>", + "detail": "(. t<'a>, (int, 'a) => 'b) => t<'b>", "documentation": {"kind": "markdown", "value": " Uncurried version of [mapWithIndex](#mapWithIndex). "} }, { "label": "mapU", "kind": 12, "tags": [], - "detail": "(t<'a>, (. 'a) => 'b) => t<'b>", + "detail": "(. t<'a>, 'a => 'b) => t<'b>", "documentation": {"kind": "markdown", "value": " Uncurried version of [map](#map). "} }, { "label": "makeByU", "kind": 12, "tags": [], - "detail": "(int, (. int) => 'a) => t<'a>", + "detail": "(. int, int => 'a) => t<'a>", "documentation": {"kind": "markdown", "value": " Uncurried version of [makeBy](#makeBy) "} }, { "label": "mapReverse2", "kind": 12, "tags": [], - "detail": "(t<'a>, t<'b>, ('a, 'b) => 'c) => t<'c>", + "detail": "(. t<'a>, t<'b>, (. 'a, 'b) => 'c) => t<'c>", "documentation": {"kind": "markdown", "value": "\n Equivalent to: `zipBy(xs, ys, f)->reverse`\n\n ```res example\n\n Belt.List.mapReverse2(list{1, 2, 3}, list{1, 2}, (a, b) => a + b) // list{4, 2}\n ```\n"} }, { "label": "mapWithIndex", "kind": 12, "tags": [], - "detail": "(t<'a>, (int, 'a) => 'b) => t<'b>", + "detail": "(. t<'a>, (. int, 'a) => 'b) => t<'b>", "documentation": {"kind": "markdown", "value": "\n Applies `f` to each element of `someList`.\n Function `f` takes two arguments: the index starting from 0 and the element from `someList`, in that order.\n\n ```res example\n list{1, 2, 3}->Belt.List.mapWithIndex((index, x) => index + x) // list{1, 3, 5}\n ```\n"} }, { "label": "mapReverseU", "kind": 12, "tags": [], - "detail": "(t<'a>, (. 'a) => 'b) => t<'b>", + "detail": "(. t<'a>, 'a => 'b) => t<'b>", "documentation": {"kind": "markdown", "value": " Uncurried version of [mapReverse](#mapReverse). "} }] @@ -86,211 +86,211 @@ Path Array. "label": "fold_left", "kind": 12, "tags": [], - "detail": "(('a, 'b) => 'a, 'a, array<'b>) => 'a", + "detail": "(. (. 'a, 'b) => 'a, 'a, array<'b>) => 'a", "documentation": {"kind": "markdown", "value": " [Array.fold_left f x a] computes\n [f (... (f (f x a.(0)) a.(1)) ...) a.(n-1)],\n where [n] is the length of the array [a]. "} }, { "label": "concat", "kind": 12, "tags": [], - "detail": "list> => array<'a>", + "detail": "(. list>) => array<'a>", "documentation": {"kind": "markdown", "value": " Same as {!Array.append}, but concatenates a list of arrays. "} }, { "label": "mapi", "kind": 12, "tags": [], - "detail": "((int, 'a) => 'b, array<'a>) => array<'b>", + "detail": "(. (. int, 'a) => 'b, array<'a>) => array<'b>", "documentation": {"kind": "markdown", "value": " Same as {!Array.map}, but the\n function is applied to the index of the element as first argument,\n and the element itself as second argument. "} }, { "label": "exists", "kind": 12, "tags": [], - "detail": "('a => bool, array<'a>) => bool", + "detail": "(. (. 'a) => bool, array<'a>) => bool", "documentation": {"kind": "markdown", "value": " [Array.exists p [|a1; ...; an|]] checks if at least one element of\n the array satisfies the predicate [p]. That is, it returns\n [(p a1) || (p a2) || ... || (p an)].\n @since 4.03.0 "} }, { "label": "for_all", "kind": 12, "tags": [], - "detail": "('a => bool, array<'a>) => bool", + "detail": "(. (. 'a) => bool, array<'a>) => bool", "documentation": {"kind": "markdown", "value": " [Array.for_all p [|a1; ...; an|]] checks if all elements of the array\n satisfy the predicate [p]. That is, it returns\n [(p a1) && (p a2) && ... && (p an)].\n @since 4.03.0 "} }, { "label": "copy", "kind": 12, "tags": [], - "detail": "array<'a> => array<'a>", + "detail": "(. array<'a>) => array<'a>", "documentation": {"kind": "markdown", "value": " [Array.copy a] returns a copy of [a], that is, a fresh array\n containing the same elements as [a]. "} }, { "label": "iter2", "kind": 12, "tags": [], - "detail": "(('a, 'b) => unit, array<'a>, array<'b>) => unit", + "detail": "(. (. 'a, 'b) => unit, array<'a>, array<'b>) => unit", "documentation": {"kind": "markdown", "value": " [Array.iter2 f a b] applies function [f] to all the elements of [a]\n and [b].\n Raise [Invalid_argument] if the arrays are not the same size.\n @since 4.03.0 "} }, { "label": "to_list", "kind": 12, "tags": [], - "detail": "array<'a> => list<'a>", + "detail": "(. array<'a>) => list<'a>", "documentation": {"kind": "markdown", "value": " [Array.to_list a] returns the list of all the elements of [a]. "} }, { "label": "stable_sort", "kind": 12, "tags": [], - "detail": "(('a, 'a) => int, array<'a>) => unit", + "detail": "(. (. 'a, 'a) => int, array<'a>) => unit", "documentation": {"kind": "markdown", "value": " Same as {!Array.sort}, but the sorting algorithm is stable (i.e.\n elements that compare equal are kept in their original order) and\n not guaranteed to run in constant heap space.\n\n The current implementation uses Merge Sort. It uses [n/2]\n words of heap space, where [n] is the length of the array.\n It is usually faster than the current implementation of {!Array.sort}.\n"} }, { "label": "iteri", "kind": 12, "tags": [], - "detail": "((int, 'a) => unit, array<'a>) => unit", + "detail": "(. (. int, 'a) => unit, array<'a>) => unit", "documentation": {"kind": "markdown", "value": " Same as {!Array.iter}, but the\n function is applied with the index of the element as first argument,\n and the element itself as second argument. "} }, { "label": "memq", "kind": 12, "tags": [], - "detail": "('a, array<'a>) => bool", + "detail": "(. 'a, array<'a>) => bool", "documentation": {"kind": "markdown", "value": " Same as {!Array.mem}, but uses physical equality instead of structural\n equality to compare array elements.\n @since 4.03.0 "} }, { "label": "map2", "kind": 12, "tags": [], - "detail": "(('a, 'b) => 'c, array<'a>, array<'b>) => array<'c>", + "detail": "(. (. 'a, 'b) => 'c, array<'a>, array<'b>) => array<'c>", "documentation": {"kind": "markdown", "value": " [Array.map2 f a b] applies function [f] to all the elements of [a]\n and [b], and builds an array with the results returned by [f]:\n [[| f a.(0) b.(0); ...; f a.(Array.length a - 1) b.(Array.length b - 1)|]].\n Raise [Invalid_argument] if the arrays are not the same size.\n @since 4.03.0 "} }, { "label": "set", "kind": 12, "tags": [], - "detail": "(array<'a>, int, 'a) => unit", + "detail": "(. array<'a>, int, 'a) => unit", "documentation": {"kind": "markdown", "value": " [Array.set a n x] modifies array [a] in place, replacing\n element number [n] with [x].\n You can also write [a.(n) <- x] instead of [Array.set a n x].\n\n Raise [Invalid_argument \"index out of bounds\"]\n if [n] is outside the range 0 to [Array.length a - 1]. "} }, { "label": "make", "kind": 12, "tags": [], - "detail": "(int, 'a) => array<'a>", + "detail": "(. int, 'a) => array<'a>", "documentation": {"kind": "markdown", "value": " [Array.make n x] returns a fresh array of length [n],\n initialized with [x].\n All the elements of this new array are initially\n physically equal to [x] (in the sense of the [==] predicate).\n Consequently, if [x] is mutable, it is shared among all elements\n of the array, and modifying [x] through one of the array entries\n will modify all other entries at the same time.\n\n Raise [Invalid_argument] if [n < 0] or [n > Sys.max_array_length].\n If the value of [x] is a floating-point number, then the maximum\n size is only [Sys.max_array_length / 2]."} }, { "label": "make_float", "kind": 12, - "tags": [], - "detail": "int => array", - "documentation": {"kind": "markdown", "value": " @deprecated [Array.make_float] is an alias for {!Array.create_float}. "} + "tags": [1], + "detail": "(. int) => array", + "documentation": {"kind": "markdown", "value": "Deprecated: Use Array.create_float instead.\n\n @deprecated [Array.make_float] is an alias for {!Array.create_float}. "} }, { "label": "fold_right", "kind": 12, "tags": [], - "detail": "(('b, 'a) => 'a, array<'b>, 'a) => 'a", + "detail": "(. (. 'b, 'a) => 'a, array<'b>, 'a) => 'a", "documentation": {"kind": "markdown", "value": " [Array.fold_right f a x] computes\n [f a.(0) (f a.(1) ( ... (f a.(n-1) x) ...))],\n where [n] is the length of the array [a]. "} }, { "label": "sort", "kind": 12, "tags": [], - "detail": "(('a, 'a) => int, array<'a>) => unit", + "detail": "(. (. 'a, 'a) => int, array<'a>) => unit", "documentation": {"kind": "markdown", "value": " Sort an array in increasing order according to a comparison\n function. The comparison function must return 0 if its arguments\n compare as equal, a positive integer if the first is greater,\n and a negative integer if the first is smaller (see below for a\n complete specification). For example, {!Pervasives.compare} is\n a suitable comparison function, provided there are no floating-point\n NaN values in the data. After calling [Array.sort], the\n array is sorted in place in increasing order.\n [Array.sort] is guaranteed to run in constant heap space\n and (at most) logarithmic stack space.\n\n The current implementation uses Heap Sort. It runs in constant\n stack space.\n\n Specification of the comparison function:\n Let [a] be the array and [cmp] the comparison function. The following\n must be true for all x, y, z in a :\n- [cmp x y] > 0 if and only if [cmp y x] < 0\n- if [cmp x y] >= 0 and [cmp y z] >= 0 then [cmp x z] >= 0\n\n When [Array.sort] returns, [a] contains the same elements as before,\n reordered in such a way that for all i and j valid indices of [a] :\n- [cmp a.(i) a.(j)] >= 0 if and only if i >= j\n"} }, { "label": "length", "kind": 12, "tags": [], - "detail": "array<'a> => int", + "detail": "(. array<'a>) => int", "documentation": {"kind": "markdown", "value": " Return the length (number of elements) of the given array. "} }, { "label": "sub", "kind": 12, "tags": [], - "detail": "(array<'a>, int, int) => array<'a>", + "detail": "(. array<'a>, int, int) => array<'a>", "documentation": {"kind": "markdown", "value": " [Array.sub a start len] returns a fresh array of length [len],\n containing the elements number [start] to [start + len - 1]\n of array [a].\n\n Raise [Invalid_argument \"Array.sub\"] if [start] and [len] do not\n designate a valid subarray of [a]; that is, if\n [start < 0], or [len < 0], or [start + len > Array.length a]. "} }, { "label": "of_list", "kind": 12, "tags": [], - "detail": "list<'a> => array<'a>", + "detail": "(. list<'a>) => array<'a>", "documentation": {"kind": "markdown", "value": " [Array.of_list l] returns a fresh array containing the elements\n of [l]. "} }, { "label": "iter", "kind": 12, "tags": [], - "detail": "('a => unit, array<'a>) => unit", + "detail": "(. (. 'a) => unit, array<'a>) => unit", "documentation": {"kind": "markdown", "value": " [Array.iter f a] applies function [f] in turn to all\n the elements of [a]. It is equivalent to\n [f a.(0); f a.(1); ...; f a.(Array.length a - 1); ()]. "} }, { "label": "map", "kind": 12, "tags": [], - "detail": "('a => 'b, array<'a>) => array<'b>", + "detail": "(. (. 'a) => 'b, array<'a>) => array<'b>", "documentation": {"kind": "markdown", "value": " [Array.map f a] applies function [f] to all the elements of [a],\n and builds an array with the results returned by [f]:\n [[| f a.(0); f a.(1); ...; f a.(Array.length a - 1) |]]. "} }, { "label": "unsafe_get", "kind": 12, "tags": [], - "detail": "(array<'a>, int) => 'a", + "detail": "(. array<'a>, int) => 'a", "documentation": null }, { "label": "make_matrix", "kind": 12, "tags": [], - "detail": "(int, int, 'a) => array>", + "detail": "(. int, int, 'a) => array>", "documentation": {"kind": "markdown", "value": " [Array.make_matrix dimx dimy e] returns a two-dimensional array\n (an array of arrays) with first dimension [dimx] and\n second dimension [dimy]. All the elements of this new matrix\n are initially physically equal to [e].\n The element ([x,y]) of a matrix [m] is accessed\n with the notation [m.(x).(y)].\n\n Raise [Invalid_argument] if [dimx] or [dimy] is negative or\n greater than {!Sys.max_array_length}.\n If the value of [e] is a floating-point number, then the maximum\n size is only [Sys.max_array_length / 2]. "} }, { "label": "mem", "kind": 12, "tags": [], - "detail": "('a, array<'a>) => bool", + "detail": "(. 'a, array<'a>) => bool", "documentation": {"kind": "markdown", "value": " [mem a l] is true if and only if [a] is equal\n to an element of [l].\n @since 4.03.0 "} }, { "label": "get", "kind": 12, "tags": [], - "detail": "(array<'a>, int) => 'a", + "detail": "(. array<'a>, int) => 'a", "documentation": {"kind": "markdown", "value": " [Array.get a n] returns the element number [n] of array [a].\n The first element has number 0.\n The last element has number [Array.length a - 1].\n You can also write [a.(n)] instead of [Array.get a n].\n\n Raise [Invalid_argument \"index out of bounds\"]\n if [n] is outside the range 0 to [(Array.length a - 1)]. "} }, { "label": "append", "kind": 12, "tags": [], - "detail": "(array<'a>, array<'a>) => array<'a>", + "detail": "(. array<'a>, array<'a>) => array<'a>", "documentation": {"kind": "markdown", "value": " [Array.append v1 v2] returns a fresh array containing the\n concatenation of the arrays [v1] and [v2]. "} }, { "label": "unsafe_set", "kind": 12, "tags": [], - "detail": "(array<'a>, int, 'a) => unit", + "detail": "(. array<'a>, int, 'a) => unit", "documentation": null }, { "label": "create_matrix", "kind": 12, - "tags": [], - "detail": "(int, int, 'a) => array>", - "documentation": {"kind": "markdown", "value": " @deprecated [Array.create_matrix] is an alias for {!Array.make_matrix}. "} + "tags": [1], + "detail": "(. int, int, 'a) => array>", + "documentation": {"kind": "markdown", "value": "Deprecated: Use Array.make_matrix instead.\n\n @deprecated [Array.create_matrix] is an alias for {!Array.make_matrix}. "} }, { "label": "create_float", "kind": 12, "tags": [], - "detail": "int => array", + "detail": "(. int) => array", "documentation": {"kind": "markdown", "value": " [Array.create_float n] returns a fresh float array of length [n],\n with uninitialized data.\n @since 4.03 "} }, { "label": "create", "kind": 12, - "tags": [], - "detail": "(int, 'a) => array<'a>", - "documentation": {"kind": "markdown", "value": " @deprecated [Array.create] is an alias for {!Array.make}. "} + "tags": [1], + "detail": "(. int, 'a) => array<'a>", + "documentation": {"kind": "markdown", "value": "Deprecated: Use Array.make instead.\n\n @deprecated [Array.create] is an alias for {!Array.make}. "} }, { "label": "init", "kind": 12, "tags": [], - "detail": "(int, int => 'a) => array<'a>", + "detail": "(. int, (. int) => 'a) => array<'a>", "documentation": {"kind": "markdown", "value": " [Array.init n f] returns a fresh array of length [n],\n with element number [i] initialized to the result of [f i].\n In other terms, [Array.init n f] tabulates the results of [f]\n applied to the integers [0] to [n-1].\n\n Raise [Invalid_argument] if [n < 0] or [n > Sys.max_array_length].\n If the return type of [f] is [float], then the maximum\n size is only [Sys.max_array_length / 2]."} }, { "label": "fast_sort", "kind": 12, "tags": [], - "detail": "(('a, 'a) => int, array<'a>) => unit", + "detail": "(. (. 'a, 'a) => int, array<'a>) => unit", "documentation": {"kind": "markdown", "value": " Same as {!Array.sort} or {!Array.stable_sort}, whichever is faster\n on typical input.\n"} }, { "label": "fill", "kind": 12, "tags": [], - "detail": "(array<'a>, int, int, 'a) => unit", + "detail": "(. array<'a>, int, int, 'a) => unit", "documentation": {"kind": "markdown", "value": " [Array.fill a ofs len x] modifies the array [a] in place,\n storing [x] in elements number [ofs] to [ofs + len - 1].\n\n Raise [Invalid_argument \"Array.fill\"] if [ofs] and [len] do not\n designate a valid subarray of [a]. "} }, { "label": "blit", "kind": 12, "tags": [], - "detail": "(array<'a>, int, array<'a>, int, int) => unit", + "detail": "(. array<'a>, int, array<'a>, int, int) => unit", "documentation": {"kind": "markdown", "value": " [Array.blit v1 o1 v2 o2 len] copies [len] elements\n from array [v1], starting at element number [o1], to array [v2],\n starting at element number [o2]. It works correctly even if\n [v1] and [v2] are the same array, and the source and\n destination chunks overlap.\n\n Raise [Invalid_argument \"Array.blit\"] if [o1] and [len] do not\n designate a valid subarray of [v1], or if [o2] and [len] do not\n designate a valid subarray of [v2]. "} }, { "label": "Floatarray", @@ -312,49 +312,49 @@ Path Array.m "label": "mapi", "kind": 12, "tags": [], - "detail": "((int, 'a) => 'b, array<'a>) => array<'b>", + "detail": "(. (. int, 'a) => 'b, array<'a>) => array<'b>", "documentation": {"kind": "markdown", "value": " Same as {!Array.map}, but the\n function is applied to the index of the element as first argument,\n and the element itself as second argument. "} }, { "label": "memq", "kind": 12, "tags": [], - "detail": "('a, array<'a>) => bool", + "detail": "(. 'a, array<'a>) => bool", "documentation": {"kind": "markdown", "value": " Same as {!Array.mem}, but uses physical equality instead of structural\n equality to compare array elements.\n @since 4.03.0 "} }, { "label": "map2", "kind": 12, "tags": [], - "detail": "(('a, 'b) => 'c, array<'a>, array<'b>) => array<'c>", + "detail": "(. (. 'a, 'b) => 'c, array<'a>, array<'b>) => array<'c>", "documentation": {"kind": "markdown", "value": " [Array.map2 f a b] applies function [f] to all the elements of [a]\n and [b], and builds an array with the results returned by [f]:\n [[| f a.(0) b.(0); ...; f a.(Array.length a - 1) b.(Array.length b - 1)|]].\n Raise [Invalid_argument] if the arrays are not the same size.\n @since 4.03.0 "} }, { "label": "make", "kind": 12, "tags": [], - "detail": "(int, 'a) => array<'a>", + "detail": "(. int, 'a) => array<'a>", "documentation": {"kind": "markdown", "value": " [Array.make n x] returns a fresh array of length [n],\n initialized with [x].\n All the elements of this new array are initially\n physically equal to [x] (in the sense of the [==] predicate).\n Consequently, if [x] is mutable, it is shared among all elements\n of the array, and modifying [x] through one of the array entries\n will modify all other entries at the same time.\n\n Raise [Invalid_argument] if [n < 0] or [n > Sys.max_array_length].\n If the value of [x] is a floating-point number, then the maximum\n size is only [Sys.max_array_length / 2]."} }, { "label": "make_float", "kind": 12, - "tags": [], - "detail": "int => array", - "documentation": {"kind": "markdown", "value": " @deprecated [Array.make_float] is an alias for {!Array.create_float}. "} + "tags": [1], + "detail": "(. int) => array", + "documentation": {"kind": "markdown", "value": "Deprecated: Use Array.create_float instead.\n\n @deprecated [Array.make_float] is an alias for {!Array.create_float}. "} }, { "label": "map", "kind": 12, "tags": [], - "detail": "('a => 'b, array<'a>) => array<'b>", + "detail": "(. (. 'a) => 'b, array<'a>) => array<'b>", "documentation": {"kind": "markdown", "value": " [Array.map f a] applies function [f] to all the elements of [a],\n and builds an array with the results returned by [f]:\n [[| f a.(0); f a.(1); ...; f a.(Array.length a - 1) |]]. "} }, { "label": "make_matrix", "kind": 12, "tags": [], - "detail": "(int, int, 'a) => array>", + "detail": "(. int, int, 'a) => array>", "documentation": {"kind": "markdown", "value": " [Array.make_matrix dimx dimy e] returns a two-dimensional array\n (an array of arrays) with first dimension [dimx] and\n second dimension [dimy]. All the elements of this new matrix\n are initially physically equal to [e].\n The element ([x,y]) of a matrix [m] is accessed\n with the notation [m.(x).(y)].\n\n Raise [Invalid_argument] if [dimx] or [dimy] is negative or\n greater than {!Sys.max_array_length}.\n If the value of [e] is a floating-point number, then the maximum\n size is only [Sys.max_array_length / 2]. "} }, { "label": "mem", "kind": 12, "tags": [], - "detail": "('a, array<'a>) => bool", + "detail": "(. 'a, array<'a>) => bool", "documentation": {"kind": "markdown", "value": " [mem a l] is true if and only if [a] is equal\n to an element of [l].\n @since 4.03.0 "} }] @@ -410,13 +410,13 @@ Path Js.Array2.m "label": "Js.Array2.mapi", "kind": 12, "tags": [], - "detail": "(t<'a>, ('a, int) => 'b) => t<'b>", + "detail": "(. t<'a>, (. 'a, int) => 'b) => t<'b>", "documentation": {"kind": "markdown", "value": "\nApplies the function (the second argument) to each item in the array, returning\na new array. The function acceps two arguments: an item from the array and its\nindex number. The result array does not have to have elements of the same type\nas the input array. See\n[`Array.map`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/map)\non MDN.\n\n```res example\n// multiply each item in array by its position\nlet product = (item, index) => item * index\nJs.Array2.mapi([10, 11, 12], product) == [0, 11, 24]\n```\n"} }, { "label": "Js.Array2.map", "kind": 12, "tags": [], - "detail": "(t<'a>, 'a => 'b) => t<'b>", + "detail": "(. t<'a>, (. 'a) => 'b) => t<'b>", "documentation": {"kind": "markdown", "value": "\nApplies the function (the second argument) to each item in the array, returning\na new array. The result array does not have to have elements of the same type\nas the input array. See\n[`Array.map`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/map)\non MDN.\n\n```res example\nJs.Array2.map([12, 4, 8], x => x * x) == [144, 16, 64]\nJs.Array2.map([\"animal\", \"vegetable\", \"mineral\"], Js.String.length) == [6, 9, 7]\n```\n"} }] @@ -433,7 +433,7 @@ Path Js.String2.toU "label": "Js.String2.toUpperCase", "kind": 12, "tags": [], - "detail": "t => t", + "detail": "(. t) => t", "documentation": {"kind": "markdown", "value": "\n`toUpperCase(str)` converts `str` to upper case using the locale-insensitive\ncase mappings in the Unicode Character Database. Notice that the conversion can\nexpand the number of letters in the result; for example the German ß\ncapitalizes to two Ses in a row.\n\nSee [`String.toUpperCase`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String/toUpperCase)\non MDN.\n\n```res example\nJs.String2.toUpperCase(\"abc\") == \"ABC\"\nJs.String2.toUpperCase(`Straße`) == `STRASSE`\nJs.String2.toUpperCase(`πς`) == `ΠΣ`\n```\n"} }] @@ -451,13 +451,13 @@ Path Belt.Option.e "label": "Belt.Option.eqU", "kind": 12, "tags": [], - "detail": "(option<'a>, option<'b>, (. 'a, 'b) => bool) => bool", + "detail": "(. option<'a>, option<'b>, ('a, 'b) => bool) => bool", "documentation": {"kind": "markdown", "value": "\n Uncurried version of `eq`\n"} }, { "label": "Belt.Option.eq", "kind": 12, "tags": [], - "detail": "(option<'a>, option<'b>, ('a, 'b) => bool) => bool", + "detail": "(. option<'a>, option<'b>, (. 'a, 'b) => bool) => bool", "documentation": {"kind": "markdown", "value": "\n Evaluates two optional values for equality with respect to a predicate\n function. If both `optValue1` and `optValue2` are `None`, returns `true`.\n If one of the arguments is `Some(value)` and the other is `None`, returns\n `false`.\n\n If arguments are `Some(value1)` and `Some(value2)`, returns the result of\n `predicate(value1, value2)`; the predicate function must return a bool.\n\n ```res example\n let clockEqual = (a, b) => mod(a, 12) == mod(b, 12)\n\n open Belt.Option\n\n eq(Some(3), Some(15), clockEqual) /* true */\n\n eq(Some(3), None, clockEqual) /* false */\n\n eq(None, Some(3), clockEqual) /* false */\n\n eq(None, None, clockEqual) /* true */\n ```\n"} }] @@ -502,13 +502,13 @@ Path Js.Dict.u "label": "unsafeGet", "kind": 12, "tags": [], - "detail": "(t<'a>, key) => 'a", + "detail": "(. t<'a>, key) => 'a", "documentation": {"kind": "markdown", "value": "\n`Js.Dict.unsafeGet(key)` returns the value if the key exists, otherwise an `undefined` value is returned. Use this only when you are sure the key exists (i.e. when having used the `keys()` function to check that the key is valid).\n\n```res example\nJs.Dict.unsafeGet(ages, \"Fred\") == 49\nJs.Dict.unsafeGet(ages, \"Paul\") // returns undefined\n```\n"} }, { "label": "unsafeDeleteKey", "kind": 12, "tags": [], - "detail": "(. t, string) => unit", + "detail": "(t, string) => unit", "documentation": {"kind": "markdown", "value": " Experimental internal function "} }] @@ -765,6 +765,8 @@ Path Objects.Rec.recordVal Complete src/Completion.res 120:7 posCursor:[120:7] posNoWhite:[120:6] Found expr:[119:11->123:1] +Pexp_construct Function$:__ghost__[0:-1->0:-1] [119:11->123:1] +posCursor:[120:7] posNoWhite:[120:6] Found expr:[119:11->123:1] posCursor:[120:7] posNoWhite:[120:6] Found expr:[120:5->122:5] posCursor:[120:7] posNoWhite:[120:6] Found expr:[120:5->120:7] Pexp_ident my:[120:5->120:7] @@ -918,13 +920,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"} }] @@ -1285,6 +1287,8 @@ Path SomeLocal Complete src/Completion.res 275:15 posCursor:[275:15] posNoWhite:[275:14] Found expr:[274:11->278:1] +Pexp_construct Function$:__ghost__[0:-1->0:-1] [274:11->278:1] +posCursor:[275:15] posNoWhite:[275:14] Found expr:[274:11->278:1] posCursor:[275:15] posNoWhite:[275:14] Found expr:[275:5->277:3] posCursor:[275:15] posNoWhite:[275:14] Found expr:[275:13->275:15] Pexp_ident _w:[275:13->275:15] @@ -1379,7 +1383,7 @@ Resolved opens 3 Completion.res Completion.res pervasives ContextPath Value[ff](~c) ContextPath Value[ff] Path ff -Found type for function ( +Found type for function (. ~opt1: int=?, ~a: int, ~b: int, @@ -1424,7 +1428,7 @@ ContextPath Value[ff](~c)(Nolabel) ContextPath Value[ff](~c) ContextPath Value[ff] Path ff -Found type for function (~a: int, ~b: int, ~opt2: int=?, unit) => int +Found type for function (. ~a: int, ~b: int, ~opt2: int=?, unit) => int [{ "label": "a", "kind": 4, @@ -1455,7 +1459,7 @@ Resolved opens 3 Completion.res Completion.res pervasives ContextPath Value[ff](~c, Nolabel) ContextPath Value[ff] Path ff -Found type for function (~a: int, ~b: int, ~opt2: int=?, unit) => int +Found type for function (. ~a: int, ~b: int, ~opt2: int=?, unit) => int [{ "label": "a", "kind": 4, @@ -1486,7 +1490,7 @@ Resolved opens 3 Completion.res Completion.res pervasives ContextPath Value[ff](~c, Nolabel, Nolabel) ContextPath Value[ff] Path ff -Found type for function (~a: int, ~b: int) => int +Found type for function (. ~a: int, ~b: int) => int [{ "label": "a", "kind": 4, @@ -1511,7 +1515,7 @@ Resolved opens 3 Completion.res Completion.res pervasives ContextPath Value[ff](~c, Nolabel, ~b) ContextPath Value[ff] Path ff -Found type for function (~a: int, ~opt2: int=?, unit) => int +Found type for function (. ~a: int, ~opt2: int=?, unit) => int [{ "label": "a", "kind": 4, @@ -1536,7 +1540,14 @@ Resolved opens 3 Completion.res Completion.res pervasives ContextPath Value[ff](~opt2) ContextPath Value[ff] Path ff -Found type for function (~opt1: int=?, ~a: int, ~b: int, unit, unit, ~c: int) => int +Found type for function (. + ~opt1: int=?, + ~a: int, + ~b: int, + unit, + unit, + ~c: int, +) => int [{ "label": "opt1", "kind": 4, @@ -1597,14 +1608,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] @@ -1616,7 +1621,7 @@ Resolved opens 3 Completion.res Completion.res pervasives ContextPath Value[withCallback](~b) ContextPath Value[withCallback] Path withCallback -Found type for function (~a: int) => int +Found type for function (. ~a: int) => int [{ "label": "a", "kind": 4, @@ -1630,6 +1635,8 @@ posCursor:[336:26] posNoWhite:[336:25] Found expr:[333:3->346:23] JSX 333:6] onClick[334:4->334:11]=...[334:13->346:23]> _children:None posCursor:[336:26] posNoWhite:[336:25] Found expr:[334:13->346:23] posCursor:[336:26] posNoWhite:[336:25] Found expr:[334:13->338:6] +Pexp_construct Function$:__ghost__[0:-1->0:-1] [334:13->338:6] +posCursor:[336:26] posNoWhite:[336:25] Found expr:[334:13->338:6] posCursor:[336:26] posNoWhite:[336:25] Found expr:[335:6->338:5] posCursor:[336:26] posNoWhite:[336:25] Found expr:[336:16->338:5] posCursor:[336:26] posNoWhite:[336:25] Found pattern:[336:20->338:5] @@ -1731,6 +1738,8 @@ posCursor:[355:23] posNoWhite:[355:22] Found expr:[355:12->355:23] Complete src/Completion.res 362:8 posCursor:[362:8] posNoWhite:[362:7] Found expr:[360:8->365:3] +Pexp_construct Function$:__ghost__[0:-1->0:-1] [360:8->365:3] +posCursor:[362:8] posNoWhite:[362:7] Found expr:[360:8->365:3] posCursor:[362:8] posNoWhite:[362:7] Found pattern:[362:7->364:5] posCursor:[362:8] posNoWhite:[362:7] Found pattern:[362:7->362:8] Ppat_construct T:[362:7->362:8] @@ -1780,6 +1789,8 @@ Path T Complete src/Completion.res 373:21 posCursor:[373:21] posNoWhite:[373:20] Found expr:[371:8->376:3] +Pexp_construct Function$:__ghost__[0:-1->0:-1] [371:8->376:3] +posCursor:[373:21] posNoWhite:[373:20] Found expr:[371:8->376:3] posCursor:[373:21] posNoWhite:[373:20] Found pattern:[373:7->375:5] posCursor:[373:21] posNoWhite:[373:20] Found pattern:[373:7->373:21] Ppat_construct AndThatOther.T:[373:7->373:21] @@ -1882,6 +1893,8 @@ Path funRecord Complete src/Completion.res 389:12 posCursor:[389:12] posNoWhite:[389:11] Found expr:[387:8->392:1] +Pexp_construct Function$:__ghost__[0:-1->0:-1] [387:8->392:1] +posCursor:[389:12] posNoWhite:[389:11] Found expr:[387:8->392:1] posCursor:[389:12] posNoWhite:[389:11] Found expr:[388:2->391:4] posCursor:[389:12] posNoWhite:[389:11] Found expr:[389:6->391:4] posCursor:[389:12] posNoWhite:[389:11] Found expr:[389:6->389:12] @@ -1897,13 +1910,13 @@ Path Js.Array2.ma "label": "Array2.mapi", "kind": 12, "tags": [], - "detail": "(t<'a>, ('a, int) => 'b) => t<'b>", + "detail": "(. t<'a>, (. 'a, int) => 'b) => t<'b>", "documentation": {"kind": "markdown", "value": "\nApplies the function (the second argument) to each item in the array, returning\na new array. The function acceps two arguments: an item from the array and its\nindex number. The result array does not have to have elements of the same type\nas the input array. See\n[`Array.map`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/map)\non MDN.\n\n```res example\n// multiply each item in array by its position\nlet product = (item, index) => item * index\nJs.Array2.mapi([10, 11, 12], product) == [0, 11, 24]\n```\n"} }, { "label": "Array2.map", "kind": 12, "tags": [], - "detail": "(t<'a>, 'a => 'b) => t<'b>", + "detail": "(. t<'a>, (. 'a) => 'b) => t<'b>", "documentation": {"kind": "markdown", "value": "\nApplies the function (the second argument) to each item in the array, returning\na new array. The result array does not have to have elements of the same type\nas the input array. See\n[`Array.map`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/map)\non MDN.\n\n```res example\nJs.Array2.map([12, 4, 8], x => x * x) == [144, 16, 64]\nJs.Array2.map([\"animal\", \"vegetable\", \"mineral\"], Js.String.length) == [6, 9, 7]\n```\n"} }] @@ -1985,6 +1998,8 @@ Path r Complete src/Completion.res 409:21 posCursor:[409:21] posNoWhite:[409:20] Found expr:[408:14->415:1] +Pexp_construct Function$:__ghost__[0:-1->0:-1] [408:14->415:1] +posCursor:[409:21] posNoWhite:[409:20] Found expr:[408:14->415:1] posCursor:[409:21] posNoWhite:[409:20] Found expr:[409:5->414:17] posCursor:[409:21] posNoWhite:[409:20] Found expr:[409:5->411:42] posCursor:[409:21] posNoWhite:[409:20] Found expr:[409:5->411:5] @@ -2011,6 +2026,8 @@ Path SomeLocalModule. Complete src/Completion.res 412:21 posCursor:[412:21] posNoWhite:[412:20] Found expr:[408:14->415:1] +Pexp_construct Function$:__ghost__[0:-1->0:-1] [408:14->415:1] +posCursor:[412:21] posNoWhite:[412:20] Found expr:[408:14->415:1] posCursor:[412:21] posNoWhite:[412:20] Found expr:[411:2->414:17] posCursor:[412:21] posNoWhite:[412:20] Found expr:[412:5->414:17] Pexp_apply ...[412:5->414:8] (...[414:9->414:16]) @@ -2050,13 +2067,13 @@ Path Belt.Int.t "label": "Belt.Int.toString", "kind": 12, "tags": [], - "detail": "int => string", + "detail": "(. int) => string", "documentation": {"kind": "markdown", "value": "\n Converts a given `int` to a `string`. Uses the JavaScript `String` constructor under the hood.\n\n ```res example\n Js.log(Belt.Int.toString(1) === \"1\") /* true */\n ```\n"} }, { "label": "Belt.Int.toFloat", "kind": 12, "tags": [], - "detail": "int => float", + "detail": "(. int) => float", "documentation": {"kind": "markdown", "value": "\n Converts a given `int` to a `float`.\n\n ```res example\n Js.log(Belt.Int.toFloat(1) === 1.0) /* true */\n ```\n"} }] @@ -2074,13 +2091,13 @@ Path Belt.Float.t "label": "Belt.Float.toInt", "kind": 12, "tags": [], - "detail": "float => int", + "detail": "(. float) => int", "documentation": {"kind": "markdown", "value": "\nConverts a given `float` to an `int`.\n\n```res example\nJs.log(Belt.Float.toInt(1.0) === 1) /* true */\n```\n"} }, { "label": "Belt.Float.toString", "kind": 12, "tags": [], - "detail": "float => string", + "detail": "(. float) => string", "documentation": {"kind": "markdown", "value": "\n Converts a given `float` to a `string`. Uses the JavaScript `String` constructor under the hood.\n\n ```res example\n Js.log(Belt.Float.toString(1.0) === \"1.0\") /* true */\n ```\n"} }] @@ -2099,13 +2116,13 @@ Path Belt.Result.g "label": "Belt.Result.getExn", "kind": 12, "tags": [], - "detail": "t<'a, 'b> => 'a", + "detail": "(. t<'a, 'b>) => 'a", "documentation": {"kind": "markdown", "value": "\n `getExn(res)`: when `res` is `Ok(n)`, returns `n` when `res` is `Error(m)`, raise an exception\n\n ```res example\n Belt.Result.getExn(Belt.Result.Ok(42)) == 42\n\n Belt.Result.getExn(Belt.Result.Error(\"Invalid data\")) /* raises exception */\n ```\n"} }, { "label": "Belt.Result.getWithDefault", "kind": 12, "tags": [], - "detail": "(t<'a, 'b>, 'a) => 'a", + "detail": "(. t<'a, 'b>, 'a) => 'a", "documentation": {"kind": "markdown", "value": "\n `getWithDefault(res, defaultValue)`: If `res` is `Ok(n)`, returns `n`,\n otherwise `default`\n\n ```res example\n Belt.Result.getWithDefault(Ok(42), 0) == 42\n\n Belt.Result.getWithDefault(Error(\"Invalid Data\"), 0) == 0\n ```\n"} }] @@ -2183,7 +2200,7 @@ Path Belt.Int.toS "label": "Belt.Int.toString", "kind": 12, "tags": [], - "detail": "int => string", + "detail": "(. int) => string", "documentation": {"kind": "markdown", "value": "\n Converts a given `int` to a `string`. Uses the JavaScript `String` constructor under the hood.\n\n ```res example\n Js.log(Belt.Int.toString(1) === \"1\") /* true */\n ```\n"} }] @@ -2196,13 +2213,13 @@ Resolved opens 3 Completion.res Completion.res pervasives ContextPath Type[withUncurried] Path withUncurried [{ - "label": "(. v) => {}", + "label": "v => {}", "kind": 12, "tags": [], - "detail": "int => unit", + "detail": "(. int) => unit", "documentation": null, "sortText": "A", - "insertText": "(. ${1:v}) => {$0}", + "insertText": "${1:v} => {$0}", "insertTextFormat": 2 }] diff --git a/analysis/tests/src/expected/CompletionExpressions.res.txt b/analysis/tests/src/expected/CompletionExpressions.res.txt index 2be6098fd..3c316261a 100644 --- a/analysis/tests/src/expected/CompletionExpressions.res.txt +++ b/analysis/tests/src/expected/CompletionExpressions.res.txt @@ -780,7 +780,7 @@ Path fnTakingCallback "label": "() => {}", "kind": 12, "tags": [], - "detail": "unit => unit", + "detail": "(. unit) => unit", "documentation": null, "sortText": "A", "insertText": "() => {$0}", @@ -811,7 +811,7 @@ Path fnTakingCallback "label": "v => {}", "kind": 12, "tags": [], - "detail": "bool => unit", + "detail": "(. bool) => unit", "documentation": null, "sortText": "A", "insertText": "${1:v} => {$0}", @@ -831,7 +831,7 @@ Path fnTakingCallback "label": "event => {}", "kind": 12, "tags": [], - "detail": "ReactEvent.Mouse.t => unit", + "detail": "(. ReactEvent.Mouse.t) => unit", "documentation": null, "sortText": "A", "insertText": "${1:event} => {$0}", @@ -851,7 +851,7 @@ Path fnTakingCallback "label": "(~on, ~off=?, variant) => {}", "kind": 12, "tags": [], - "detail": "(~on: bool, ~off: bool=?, variant) => int", + "detail": "(. ~on: bool, ~off: bool=?, variant) => int", "documentation": null, "sortText": "A", "insertText": "(~on, ~off=?, ${1:variant}) => {$0}", @@ -871,7 +871,7 @@ Path fnTakingCallback "label": "(v1, v2, v3) => {}", "kind": 12, "tags": [], - "detail": "(bool, option, bool) => unit", + "detail": "(. bool, option, bool) => unit", "documentation": null, "sortText": "A", "insertText": "(${1:v1}, ${2:v2}, ${3:v3}) => {$0}", @@ -891,7 +891,7 @@ Path fnTakingCallback "label": "(~on=?, ~off=?, ()) => {}", "kind": 12, "tags": [], - "detail": "(~on: bool=?, ~off: bool=?, unit) => int", + "detail": "(. ~on: bool=?, ~off: bool=?, unit) => int", "documentation": null, "sortText": "A", "insertText": "(~on=?, ~off=?, ()) => {$0}", @@ -967,7 +967,7 @@ Path takesCb "label": "someTyp => {}", "kind": 12, "tags": [], - "detail": "someTyp => 'a", + "detail": "(. someTyp) => 'a", "documentation": null, "sortText": "A", "insertText": "${1:someTyp} => {$0}", @@ -987,7 +987,7 @@ Path takesCb2 "label": "environment => {}", "kind": 12, "tags": [], - "detail": "Environment.t => 'a", + "detail": "(. Environment.t) => 'a", "documentation": null, "sortText": "A", "insertText": "${1:environment} => {$0}", @@ -1007,7 +1007,7 @@ Path takesCb3 "label": "apiCallResult => {}", "kind": 12, "tags": [], - "detail": "apiCallResult => 'a", + "detail": "(. apiCallResult) => 'a", "documentation": null, "sortText": "A", "insertText": "${1:apiCallResult} => {$0}", @@ -1027,7 +1027,7 @@ Path takesCb4 "label": "apiCallResult => {}", "kind": 12, "tags": [], - "detail": "option => 'a", + "detail": "(. option) => 'a", "documentation": null, "sortText": "A", "insertText": "${1:apiCallResult} => {$0}", @@ -1047,7 +1047,7 @@ Path takesCb5 "label": "apiCallResults => {}", "kind": 12, "tags": [], - "detail": "array> => 'a", + "detail": "(. array>) => 'a", "documentation": null, "sortText": "A", "insertText": "${1:apiCallResults} => {$0}", @@ -1067,7 +1067,7 @@ Path commitLocalUpdate "label": "recordSourceSelectorProxy => {}", "kind": 12, "tags": [], - "detail": "RecordSourceSelectorProxy.t => unit", + "detail": "(. RecordSourceSelectorProxy.t) => unit", "documentation": null, "sortText": "A", "insertText": "${1:recordSourceSelectorProxy} => {$0}", diff --git a/analysis/tests/src/expected/CompletionFunctionArguments.res.txt b/analysis/tests/src/expected/CompletionFunctionArguments.res.txt index d15f00087..139295fa6 100644 --- a/analysis/tests/src/expected/CompletionFunctionArguments.res.txt +++ b/analysis/tests/src/expected/CompletionFunctionArguments.res.txt @@ -370,6 +370,8 @@ Complete src/CompletionFunctionArguments.res 109:29 posCursor:[109:29] posNoWhite:[109:28] Found expr:[105:3->114:4] JSX 105:6] onMouseDown[106:4->106:15]=...[106:35->113:5]> _children:114:2 posCursor:[109:29] posNoWhite:[109:28] Found expr:[106:35->113:5] +Pexp_construct Function$:__ghost__[0:-1->0:-1] [106:16->113:5] +posCursor:[109:29] posNoWhite:[109:28] Found expr:[106:16->113:5] posCursor:[109:29] posNoWhite:[109:28] Found expr:[107:6->109:29] posCursor:[109:29] posNoWhite:[109:28] Found expr:[108:6->109:29] posCursor:[109:29] posNoWhite:[109:28] Found expr:[109:9->109:29] @@ -395,6 +397,8 @@ Complete src/CompletionFunctionArguments.res 111:27 posCursor:[111:27] posNoWhite:[111:26] Found expr:[105:3->114:4] JSX 105:6] onMouseDown[106:4->106:15]=...[106:35->113:5]> _children:114:2 posCursor:[111:27] posNoWhite:[111:26] Found expr:[106:35->113:5] +Pexp_construct Function$:__ghost__[0:-1->0:-1] [106:16->113:5] +posCursor:[111:27] posNoWhite:[111:26] Found expr:[106:16->113:5] posCursor:[111:27] posNoWhite:[111:26] Found expr:[107:6->111:27] posCursor:[111:27] posNoWhite:[111:26] Found expr:[108:6->111:27] posCursor:[111:27] posNoWhite:[111:26] Found expr:[111:9->111:27] diff --git a/analysis/tests/src/expected/CompletionInferValues.res.txt b/analysis/tests/src/expected/CompletionInferValues.res.txt index 55b527da6..8b00b52ad 100644 --- a/analysis/tests/src/expected/CompletionInferValues.res.txt +++ b/analysis/tests/src/expected/CompletionInferValues.res.txt @@ -15,13 +15,13 @@ Path Belt.Int.f "label": "Belt.Int.fromString", "kind": 12, "tags": [], - "detail": "string => option", + "detail": "(. string) => option", "documentation": {"kind": "markdown", "value": "\n Converts a given `string` to an `int`. Returns `Some(int)` when the input is a number, `None` otherwise.\n\n ```res example\n Js.log(Belt.Int.fromString(\"1\") === Some(1)) /* true */\n ```\n"} }, { "label": "Belt.Int.fromFloat", "kind": 12, "tags": [], - "detail": "float => int", + "detail": "(. float) => int", "documentation": {"kind": "markdown", "value": "\n Converts a given `float` to an `int`.\n\n ```res example\n Js.log(Belt.Int.fromFloat(1.0) === 1) /* true */\n ```\n"} }] @@ -83,6 +83,8 @@ Complete src/CompletionInferValues.res 24:63 posCursor:[24:63] posNoWhite:[24:62] Found expr:[24:3->24:64] Pexp_apply ...[24:3->24:21] (...[24:22->24:63]) posCursor:[24:63] posNoWhite:[24:62] Found expr:[24:22->24:63] +Pexp_construct Function$:__ghost__[0:-1->0:-1] [24:23->24:63] +posCursor:[24:63] posNoWhite:[24:62] Found expr:[24:23->24:63] posCursor:[24:63] posNoWhite:[24:62] Found expr:[24:36->24:63] posCursor:[24:63] posNoWhite:[24:62] Found expr:[24:42->24:63] posCursor:[24:63] posNoWhite:[24:62] Found expr:[24:52->24:63] @@ -115,6 +117,8 @@ Complete src/CompletionInferValues.res 27:90 posCursor:[27:90] posNoWhite:[27:89] Found expr:[27:39->27:91] Pexp_apply ...[27:39->27:48] (...[27:49->27:90]) posCursor:[27:90] posNoWhite:[27:89] Found expr:[27:49->27:90] +Pexp_construct Function$:__ghost__[0:-1->0:-1] [27:50->27:90] +posCursor:[27:90] posNoWhite:[27:89] Found expr:[27:50->27:90] posCursor:[27:90] posNoWhite:[27:89] Found expr:[27:56->27:90] posCursor:[27:90] posNoWhite:[27:89] Found expr:[27:69->27:90] posCursor:[27:90] posNoWhite:[27:89] Found expr:[27:79->27:90] @@ -149,6 +153,8 @@ Complete src/CompletionInferValues.res 30:36 posCursor:[30:36] posNoWhite:[30:35] Found expr:[30:3->30:39] Pexp_apply ...[30:3->30:15] (...[30:16->30:38]) posCursor:[30:36] posNoWhite:[30:35] Found expr:[30:16->30:38] +Pexp_construct Function$:__ghost__[0:-1->0:-1] [30:16->30:38] +posCursor:[30:36] posNoWhite:[30:35] Found expr:[30:16->30:38] posCursor:[30:36] posNoWhite:[30:35] Found expr:[30:27->30:36] Completable: Cpath Value[event]->pr Package opens Pervasives.JsxModules.place holder @@ -176,6 +182,8 @@ Complete src/CompletionInferValues.res 41:50 posCursor:[41:50] posNoWhite:[41:49] Found expr:[41:12->41:56] JSX 41:15] onMouseEnter[41:16->41:28]=...[41:36->41:52]> _children:41:54 posCursor:[41:50] posNoWhite:[41:49] Found expr:[41:36->41:52] +Pexp_construct Function$:__ghost__[0:-1->0:-1] [41:29->41:52] +posCursor:[41:50] posNoWhite:[41:49] Found expr:[41:29->41:52] posCursor:[41:50] posNoWhite:[41:49] Found expr:[41:41->41:50] Completable: Cpath Value[event]->pr <> Package opens Pervasives.JsxModules.place holder @@ -186,13 +194,13 @@ Path event ContextPath CArgument CJsxPropValue [div] onMouseEnter($0) ContextPath CJsxPropValue [div] onMouseEnter Path ReactDOM.domProps -Path Pervasives.JsxDOM.domProps +Path PervasivesU.JsxDOM.domProps CPPipe env:CompletionInferValues -CPPipe type path:JsxEventC.Mouse.t -CPPipe pathFromEnv:JsxEventC.Mouse found:false -Path JsxEventC.Mouse.pr +CPPipe type path:JsxEventU.Mouse.t +CPPipe pathFromEnv:JsxEventU.Mouse found:false +Path JsxEventU.Mouse.pr [{ - "label": "JsxEventC.Mouse.preventDefault", + "label": "JsxEventU.Mouse.preventDefault", "kind": 12, "tags": [], "detail": "t => unit", @@ -203,6 +211,8 @@ Complete src/CompletionInferValues.res 44:50 posCursor:[44:50] posNoWhite:[44:49] Found expr:[44:12->44:56] JSX 44:15] onMouseEnter[44:16->44:28]=...[44:36->44:52]> _children:44:54 posCursor:[44:50] posNoWhite:[44:49] Found expr:[44:36->44:52] +Pexp_construct Function$:__ghost__[0:-1->0:-1] [44:29->44:52] +posCursor:[44:50] posNoWhite:[44:49] Found expr:[44:29->44:52] posCursor:[44:50] posNoWhite:[44:49] Found expr:[44:41->44:50] Completable: Cpath Value[event]->pr <> Package opens Pervasives.JsxModules.place holder @@ -214,11 +224,11 @@ 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 +CPPipe type path:PervasivesU.JsxEvent.Mouse.t +CPPipe pathFromEnv:PervasivesU.JsxEvent.Mouse found:false +Path PervasivesU.JsxEvent.Mouse.pr [{ - "label": "Pervasives.JsxEvent.Mouse.preventDefault", + "label": "PervasivesU.JsxEvent.Mouse.preventDefault", "kind": 12, "tags": [], "detail": "t => unit", @@ -229,6 +239,8 @@ Complete src/CompletionInferValues.res 47:87 posCursor:[47:87] posNoWhite:[47:86] Found expr:[47:12->47:93] JSX 47:15] onMouseEnter[47:16->47:28]=...[47:36->47:89]> _children:47:91 posCursor:[47:87] posNoWhite:[47:86] Found expr:[47:36->47:89] +Pexp_construct Function$:__ghost__[0:-1->0:-1] [47:29->47:89] +posCursor:[47:87] posNoWhite:[47:86] Found expr:[47:29->47:89] posCursor:[47:87] posNoWhite:[47:86] Found expr:[47:41->47:87] posCursor:[47:87] posNoWhite:[47:86] Found expr:[47:81->47:87] Completable: Cpath Value[btn]->t <> @@ -240,19 +252,19 @@ Path btn ContextPath Value[JsxEvent, Mouse, button](Nolabel) ContextPath Value[JsxEvent, Mouse, button] Path JsxEvent.Mouse.button -CPPipe env:CompletionInferValues envFromCompletionItem:JsxEventC.Mouse +CPPipe env:CompletionInferValues envFromCompletionItem:JsxEventU.Mouse Path Belt.Int.t [{ "label": "Belt.Int.toString", "kind": 12, "tags": [], - "detail": "int => string", + "detail": "(. int) => string", "documentation": {"kind": "markdown", "value": "\n Converts a given `int` to a `string`. Uses the JavaScript `String` constructor under the hood.\n\n ```res example\n Js.log(Belt.Int.toString(1) === \"1\") /* true */\n ```\n"} }, { "label": "Belt.Int.toFloat", "kind": 12, "tags": [], - "detail": "int => float", + "detail": "(. int) => float", "documentation": {"kind": "markdown", "value": "\n Converts a given `int` to a `float`.\n\n ```res example\n Js.log(Belt.Int.toFloat(1) === 1.0) /* true */\n ```\n"} }] @@ -260,6 +272,8 @@ Complete src/CompletionInferValues.res 50:108 posCursor:[50:108] posNoWhite:[50:107] Found expr:[50:12->50:114] JSX 50:15] onMouseEnter[50:16->50:28]=...[50:36->50:110]> _children:50:112 posCursor:[50:108] posNoWhite:[50:107] Found expr:[50:36->50:110] +Pexp_construct Function$:__ghost__[0:-1->0:-1] [50:29->50:110] +posCursor:[50:108] posNoWhite:[50:107] Found expr:[50:29->50:110] posCursor:[50:108] posNoWhite:[50:107] Found expr:[50:41->50:108] posCursor:[50:108] posNoWhite:[50:107] Found expr:[50:100->50:108] Completable: Cpath Value[btn]->spl <> @@ -277,32 +291,34 @@ Path Js.String2.spl "label": "Js.String2.splitAtMost", "kind": 12, "tags": [], - "detail": "(t, t, ~limit: int) => array", + "detail": "(. t, t, ~limit: int) => array", "documentation": {"kind": "markdown", "value": "\n `splitAtMost delimiter ~limit: n str` splits the given `str` at every occurrence of `delimiter` and returns an array of the first `n` resulting substrings. If `n` is negative or greater than the number of substrings, the array will contain all the substrings.\n\n```\nsplitAtMost \"ant/bee/cat/dog/elk\" \"/\" ~limit: 3 = [|\"ant\"; \"bee\"; \"cat\"|];;\nsplitAtMost \"ant/bee/cat/dog/elk\" \"/\" ~limit: 0 = [| |];;\nsplitAtMost \"ant/bee/cat/dog/elk\" \"/\" ~limit: 9 = [|\"ant\"; \"bee\"; \"cat\"; \"dog\"; \"elk\"|];;\n```\n"} }, { "label": "Js.String2.splitByRe", "kind": 12, "tags": [], - "detail": "(t, Js_re.t) => array>", - "documentation": {"kind": "markdown", "value": "\n`splitByRe(str, regex)` splits the given `str` at every occurrence of `regex`\nand returns an array of the resulting substrings.\n\nSee [`String.split`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String/split)\non MDN.\n\n```res example\nJs.String2.splitByRe(\"art; bed , cog ;dad\", %re(\"/\\s*[,;]\\s*/\")) == [\n Some(\"art\"),\n Some(\"bed\"),\n Some(\"cog\"),\n Some(\"dad\"),\n ]\n```\n"} + "detail": "(. t, Js_re.t) => array>", + "documentation": {"kind": "markdown", "value": "\n`splitByRe(str, regex)` splits the given `str` at every occurrence of `regex`\nand returns an array of the resulting substrings.\n\nSee [`String.split`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String/split)\non MDN.\n\n```res example\nJs.String2.splitByRe(\"art; bed , cog ;dad\", %re(\"/\\s*[,;]\\s*TODO/\")) == [\n Some(\"art\"),\n Some(\"bed\"),\n Some(\"cog\"),\n Some(\"dad\"),\n ]\n```\n"} }, { "label": "Js.String2.split", "kind": 12, "tags": [], - "detail": "(t, t) => array", + "detail": "(. t, t) => array", "documentation": {"kind": "markdown", "value": "\n`split(str, delimiter)` splits the given `str` at every occurrence of\n`delimiter` and returns an array of the resulting substrings.\n\nSee [`String.split`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String/split)\non MDN.\n\n```res example\nJs.String2.split(\"2018-01-02\", \"-\") == [\"2018\", \"01\", \"02\"]\nJs.String2.split(\"a,b,,c\", \",\") == [\"a\", \"b\", \"\", \"c\"]\nJs.String2.split(\"good::bad as great::awful\", \"::\") == [\"good\", \"bad as great\", \"awful\"]\nJs.String2.split(\"has-no-delimiter\", \";\") == [\"has-no-delimiter\"]\n```\n"} }, { "label": "Js.String2.splitByReAtMost", "kind": 12, "tags": [], - "detail": "(t, Js_re.t, ~limit: int) => array>", - "documentation": {"kind": "markdown", "value": "\n`splitByReAtMost(str, regex, ~limit:n)` splits the given `str` at every\noccurrence of `regex` and returns an array of the first `n` resulting\nsubstrings. If `n` is negative or greater than the number of substrings, the\narray will contain all the substrings.\n\nSee [`String.split`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String/split)\non MDN.\n\n```res example\nJs.String2.splitByReAtMost(\"one: two: three: four\", %re(\"/\\s*:\\s*/\"), ~limit=3) == [\n Some(\"one\"),\n Some(\"two\"),\n Some(\"three\"),\n ]\n\nJs.String2.splitByReAtMost(\"one: two: three: four\", %re(\"/\\s*:\\s*/\"), ~limit=0) == []\n\nJs.String2.splitByReAtMost(\"one: two: three: four\", %re(\"/\\s*:\\s*/\"), ~limit=8) == [\n Some(\"one\"),\n Some(\"two\"),\n Some(\"three\"),\n Some(\"four\"),\n ]\n```\n"} + "detail": "(. t, Js_re.t, ~limit: int) => array>", + "documentation": {"kind": "markdown", "value": "\n`splitByReAtMost(str, regex, ~limit:n)` splits the given `str` at every\noccurrence of `regex` and returns an array of the first `n` resulting\nsubstrings. If `n` is negative or greater than the number of substrings, the\narray will contain all the substrings.\n\nSee [`String.split`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String/split)\non MDN.\n\n```res example\nJs.String2.splitByReAtMost(\"one: two: three: four\", %re(\"/\\s*:\\s*TODO/\"), ~limit=3) == [\n Some(\"one\"),\n Some(\"two\"),\n Some(\"three\"),\n ]\n\nJs.String2.splitByReAtMost(\"one: two: three: four\", %re(\"/\\s*:\\s*TODO/\"), ~limit=0) == []\n\nJs.String2.splitByReAtMost(\"one: two: three: four\", %re(\"/\\s*:\\s*TODO/\"), ~limit=8) == [\n Some(\"one\"),\n Some(\"two\"),\n Some(\"three\"),\n Some(\"four\"),\n ]\n```\n"} }] Complete src/CompletionInferValues.res 53:130 posCursor:[53:130] posNoWhite:[53:129] Found expr:[53:12->53:136] JSX 53:15] onMouseEnter[53:16->53:28]=...[53:36->53:132]> _children:53:134 posCursor:[53:130] posNoWhite:[53:129] Found expr:[53:36->53:132] +Pexp_construct Function$:__ghost__[0:-1->0:-1] [53:29->53:132] +posCursor:[53:130] posNoWhite:[53:129] Found expr:[53:29->53:132] posCursor:[53:130] posNoWhite:[53:129] Found expr:[53:41->53:130] posCursor:[53:130] posNoWhite:[53:129] Found expr:[53:123->53:130] Completable: Cpath Value[btn]->ma <> @@ -320,13 +336,13 @@ Path Js.Array2.ma "label": "Js.Array2.mapi", "kind": 12, "tags": [], - "detail": "(t<'a>, ('a, int) => 'b) => t<'b>", + "detail": "(. t<'a>, (. 'a, int) => 'b) => t<'b>", "documentation": {"kind": "markdown", "value": "\nApplies the function (the second argument) to each item in the array, returning\na new array. The function acceps two arguments: an item from the array and its\nindex number. The result array does not have to have elements of the same type\nas the input array. See\n[`Array.map`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/map)\non MDN.\n\n```res example\n// multiply each item in array by its position\nlet product = (item, index) => item * index\nJs.Array2.mapi([10, 11, 12], product) == [0, 11, 24]\n```\n"} }, { "label": "Js.Array2.map", "kind": 12, "tags": [], - "detail": "(t<'a>, 'a => 'b) => t<'b>", + "detail": "(. t<'a>, (. 'a) => 'b) => t<'b>", "documentation": {"kind": "markdown", "value": "\nApplies the function (the second argument) to each item in the array, returning\na new array. The result array does not have to have elements of the same type\nas the input array. See\n[`Array.map`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/map)\non MDN.\n\n```res example\nJs.Array2.map([12, 4, 8], x => x * x) == [144, 16, 64]\nJs.Array2.map([\"animal\", \"vegetable\", \"mineral\"], Js.String.length) == [6, 9, 7]\n```\n"} }] @@ -452,13 +468,13 @@ Path Js.String2.slic "label": "Js.String2.sliceToEnd", "kind": 12, "tags": [], - "detail": "(t, ~from: int) => t", + "detail": "(. t, ~from: int) => t", "documentation": {"kind": "markdown", "value": "\n`sliceToEnd(str, from:n)` returns the substring of `str` starting at character\n`n` to the end of the string.\n- If `n` is negative, then it is evaluated as `length(str - n)`.\n- If `n` is greater than the length of `str`, then sliceToEnd returns the empty string.\n\nSee [`String.slice`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String/slice) on MDN.\n\n```res example\nJs.String2.sliceToEnd(\"abcdefg\", ~from=4) == \"efg\"\nJs.String2.sliceToEnd(\"abcdefg\", ~from=-2) == \"fg\"\nJs.String2.sliceToEnd(\"abcdefg\", ~from=7) == \"\"\n```\n"} }, { "label": "Js.String2.slice", "kind": 12, "tags": [], - "detail": "(t, ~from: int, ~to_: int) => t", + "detail": "(. t, ~from: int, ~to_: int) => t", "documentation": {"kind": "markdown", "value": "\n`slice(str, from:n1, to_:n2)` returns the substring of `str` starting at\ncharacter `n1` up to but not including `n2`.\n- If either `n1` or `n2` is negative, then it is evaluated as `length(str - n1)` or `length(str - n2)`.\n- If `n2` is greater than the length of `str`, then it is treated as `length(str)`.\n- If `n1` is greater than `n2`, slice returns the empty string.\n\nSee [`String.slice`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String/slice) on MDN.\n\n```res example\nJs.String2.slice(\"abcdefg\", ~from=2, ~to_=5) == \"cde\"\nJs.String2.slice(\"abcdefg\", ~from=2, ~to_=9) == \"cdefg\"\nJs.String2.slice(\"abcdefg\", ~from=-4, ~to_=-2) == \"de\"\nJs.String2.slice(\"abcdefg\", ~from=5, ~to_=1) == \"\"\n```\n"} }] @@ -481,7 +497,7 @@ Path Belt.Int.toS "label": "Belt.Int.toString", "kind": 12, "tags": [], - "detail": "int => string", + "detail": "(. int) => string", "documentation": {"kind": "markdown", "value": "\n Converts a given `int` to a `string`. Uses the JavaScript `String` constructor under the hood.\n\n ```res example\n Js.log(Belt.Int.toString(1) === \"1\") /* true */\n ```\n"} }] @@ -507,7 +523,7 @@ Path Belt.Int.toS "label": "Belt.Int.toString", "kind": 12, "tags": [], - "detail": "int => string", + "detail": "(. int) => string", "documentation": {"kind": "markdown", "value": "\n Converts a given `int` to a `string`. Uses the JavaScript `String` constructor under the hood.\n\n ```res example\n Js.log(Belt.Int.toString(1) === \"1\") /* true */\n ```\n"} }] @@ -534,7 +550,7 @@ Path Belt.Int.toS "label": "Belt.Int.toString", "kind": 12, "tags": [], - "detail": "int => string", + "detail": "(. int) => string", "documentation": {"kind": "markdown", "value": "\n Converts a given `int` to a `string`. Uses the JavaScript `String` constructor under the hood.\n\n ```res example\n Js.log(Belt.Int.toString(1) === \"1\") /* true */\n ```\n"} }] @@ -557,13 +573,13 @@ Path Js.String2.slic "label": "Js.String2.sliceToEnd", "kind": 12, "tags": [], - "detail": "(t, ~from: int) => t", + "detail": "(. t, ~from: int) => t", "documentation": {"kind": "markdown", "value": "\n`sliceToEnd(str, from:n)` returns the substring of `str` starting at character\n`n` to the end of the string.\n- If `n` is negative, then it is evaluated as `length(str - n)`.\n- If `n` is greater than the length of `str`, then sliceToEnd returns the empty string.\n\nSee [`String.slice`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String/slice) on MDN.\n\n```res example\nJs.String2.sliceToEnd(\"abcdefg\", ~from=4) == \"efg\"\nJs.String2.sliceToEnd(\"abcdefg\", ~from=-2) == \"fg\"\nJs.String2.sliceToEnd(\"abcdefg\", ~from=7) == \"\"\n```\n"} }, { "label": "Js.String2.slice", "kind": 12, "tags": [], - "detail": "(t, ~from: int, ~to_: int) => t", + "detail": "(. t, ~from: int, ~to_: int) => t", "documentation": {"kind": "markdown", "value": "\n`slice(str, from:n1, to_:n2)` returns the substring of `str` starting at\ncharacter `n1` up to but not including `n2`.\n- If either `n1` or `n2` is negative, then it is evaluated as `length(str - n1)` or `length(str - n2)`.\n- If `n2` is greater than the length of `str`, then it is treated as `length(str)`.\n- If `n1` is greater than `n2`, slice returns the empty string.\n\nSee [`String.slice`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String/slice) on MDN.\n\n```res example\nJs.String2.slice(\"abcdefg\", ~from=2, ~to_=5) == \"cde\"\nJs.String2.slice(\"abcdefg\", ~from=2, ~to_=9) == \"cdefg\"\nJs.String2.slice(\"abcdefg\", ~from=-4, ~to_=-2) == \"de\"\nJs.String2.slice(\"abcdefg\", ~from=5, ~to_=1) == \"\"\n```\n"} }] @@ -586,13 +602,13 @@ Path Js.String2.slic "label": "Js.String2.sliceToEnd", "kind": 12, "tags": [], - "detail": "(t, ~from: int) => t", + "detail": "(. t, ~from: int) => t", "documentation": {"kind": "markdown", "value": "\n`sliceToEnd(str, from:n)` returns the substring of `str` starting at character\n`n` to the end of the string.\n- If `n` is negative, then it is evaluated as `length(str - n)`.\n- If `n` is greater than the length of `str`, then sliceToEnd returns the empty string.\n\nSee [`String.slice`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String/slice) on MDN.\n\n```res example\nJs.String2.sliceToEnd(\"abcdefg\", ~from=4) == \"efg\"\nJs.String2.sliceToEnd(\"abcdefg\", ~from=-2) == \"fg\"\nJs.String2.sliceToEnd(\"abcdefg\", ~from=7) == \"\"\n```\n"} }, { "label": "Js.String2.slice", "kind": 12, "tags": [], - "detail": "(t, ~from: int, ~to_: int) => t", + "detail": "(. t, ~from: int, ~to_: int) => t", "documentation": {"kind": "markdown", "value": "\n`slice(str, from:n1, to_:n2)` returns the substring of `str` starting at\ncharacter `n1` up to but not including `n2`.\n- If either `n1` or `n2` is negative, then it is evaluated as `length(str - n1)` or `length(str - n2)`.\n- If `n2` is greater than the length of `str`, then it is treated as `length(str)`.\n- If `n1` is greater than `n2`, slice returns the empty string.\n\nSee [`String.slice`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String/slice) on MDN.\n\n```res example\nJs.String2.slice(\"abcdefg\", ~from=2, ~to_=5) == \"cde\"\nJs.String2.slice(\"abcdefg\", ~from=2, ~to_=9) == \"cdefg\"\nJs.String2.slice(\"abcdefg\", ~from=-4, ~to_=-2) == \"de\"\nJs.String2.slice(\"abcdefg\", ~from=5, ~to_=1) == \"\"\n```\n"} }] @@ -615,13 +631,13 @@ Path Js.String2.slic "label": "Js.String2.sliceToEnd", "kind": 12, "tags": [], - "detail": "(t, ~from: int) => t", + "detail": "(. t, ~from: int) => t", "documentation": {"kind": "markdown", "value": "\n`sliceToEnd(str, from:n)` returns the substring of `str` starting at character\n`n` to the end of the string.\n- If `n` is negative, then it is evaluated as `length(str - n)`.\n- If `n` is greater than the length of `str`, then sliceToEnd returns the empty string.\n\nSee [`String.slice`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String/slice) on MDN.\n\n```res example\nJs.String2.sliceToEnd(\"abcdefg\", ~from=4) == \"efg\"\nJs.String2.sliceToEnd(\"abcdefg\", ~from=-2) == \"fg\"\nJs.String2.sliceToEnd(\"abcdefg\", ~from=7) == \"\"\n```\n"} }, { "label": "Js.String2.slice", "kind": 12, "tags": [], - "detail": "(t, ~from: int, ~to_: int) => t", + "detail": "(. t, ~from: int, ~to_: int) => t", "documentation": {"kind": "markdown", "value": "\n`slice(str, from:n1, to_:n2)` returns the substring of `str` starting at\ncharacter `n1` up to but not including `n2`.\n- If either `n1` or `n2` is negative, then it is evaluated as `length(str - n1)` or `length(str - n2)`.\n- If `n2` is greater than the length of `str`, then it is treated as `length(str)`.\n- If `n1` is greater than `n2`, slice returns the empty string.\n\nSee [`String.slice`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String/slice) on MDN.\n\n```res example\nJs.String2.slice(\"abcdefg\", ~from=2, ~to_=5) == \"cde\"\nJs.String2.slice(\"abcdefg\", ~from=2, ~to_=9) == \"cdefg\"\nJs.String2.slice(\"abcdefg\", ~from=-4, ~to_=-2) == \"de\"\nJs.String2.slice(\"abcdefg\", ~from=5, ~to_=1) == \"\"\n```\n"} }] @@ -671,7 +687,7 @@ Path Belt.Int.toSt "label": "Belt.Int.toString", "kind": 12, "tags": [], - "detail": "int => string", + "detail": "(. int) => string", "documentation": {"kind": "markdown", "value": "\n Converts a given `int` to a `string`. Uses the JavaScript `String` constructor under the hood.\n\n ```res example\n Js.log(Belt.Int.toString(1) === \"1\") /* true */\n ```\n"} }] @@ -679,6 +695,8 @@ Complete src/CompletionInferValues.res 130:26 posCursor:[130:26] posNoWhite:[130:25] Found expr:[130:3->130:37] Pexp_apply ...[130:3->130:23] (...[130:24->130:36]) posCursor:[130:26] posNoWhite:[130:25] Found expr:[130:24->130:36] +Pexp_construct Function$:__ghost__[0:-1->0:-1] [130:25->130:36] +posCursor:[130:26] posNoWhite:[130:25] Found expr:[130:25->130:36] posCursor:[130:26] posNoWhite:[130:25] Found pattern:[130:25->130:27] posCursor:[130:26] posNoWhite:[130:25] Found pattern:[130:25->130:27] Completable: Cpattern CArgument CArgument Value[fnWithRecordCallback]($0)($0)->recordBody @@ -706,6 +724,8 @@ Complete src/CompletionInferValues.res 137:30 posCursor:[137:30] posNoWhite:[137:29] Found expr:[137:3->137:33] Pexp_apply ...[137:3->137:6] (~cb137:8->137:10=...[137:11->137:32]) posCursor:[137:30] posNoWhite:[137:29] Found expr:[137:11->137:32] +Pexp_construct Function$:__ghost__[0:-1->0:-1] [137:12->137:32] +posCursor:[137:30] posNoWhite:[137:29] Found expr:[137:12->137:32] posCursor:[137:30] posNoWhite:[137:29] Found expr:[137:24->0:-1] posCursor:[137:30] posNoWhite:[137:29] Found expr:[137:24->0:-1] Completable: Cpath Value[root]-> @@ -741,6 +761,8 @@ Complete src/CompletionInferValues.res 146:30 posCursor:[146:30] posNoWhite:[146:29] Found expr:[146:3->146:33] Pexp_apply ...[146:3->146:6] (~cb146:8->146:10=...[146:11->146:32]) posCursor:[146:30] posNoWhite:[146:29] Found expr:[146:11->146:32] +Pexp_construct Function$:__ghost__[0:-1->0:-1] [146:12->146:32] +posCursor:[146:30] posNoWhite:[146:29] Found expr:[146:12->146:32] posCursor:[146:30] posNoWhite:[146:29] Found expr:[146:24->0:-1] posCursor:[146:30] posNoWhite:[146:29] Found expr:[146:24->0:-1] Completable: Cpath Value[root]-> @@ -820,6 +842,8 @@ Complete src/CompletionInferValues.res 158:105 posCursor:[158:105] posNoWhite:[158:104] Found expr:[158:18->158:110] Pexp_apply ...[158:18->158:49] (~prepare158:51->158:58=...[158:59->158:72], ~render158:74->158:80=...[158:81->158:106], ...[158:107->158:109]) posCursor:[158:105] posNoWhite:[158:104] Found expr:[158:81->158:106] +Pexp_construct Function$:__ghost__[0:-1->0:-1] [158:82->158:106] +posCursor:[158:105] posNoWhite:[158:104] Found expr:[158:82->158:106] posCursor:[158:105] posNoWhite:[158:104] Found expr:[158:97->158:105] Pexp_field [158:97->158:104] _:[158:105->158:105] Completable: Cpath Value[support]."" @@ -845,6 +869,8 @@ Complete src/CompletionInferValues.res 162:110 posCursor:[162:110] posNoWhite:[162:109] Found expr:[162:18->162:115] Pexp_apply ...[162:18->162:49] (~prepare162:51->162:58=...[162:59->162:72], ~render162:74->162:80=...[162:81->162:111], ...[162:112->162:114]) posCursor:[162:110] posNoWhite:[162:109] Found expr:[162:81->162:111] +Pexp_construct Function$:__ghost__[0:-1->0:-1] [162:82->162:111] +posCursor:[162:110] posNoWhite:[162:109] Found expr:[162:82->162:111] posCursor:[162:110] posNoWhite:[162:109] Found expr:[162:104->0:-1] posCursor:[162:110] posNoWhite:[162:109] Found expr:[162:104->0:-1] Completable: Cpath Value[root]-> diff --git a/analysis/tests/src/expected/CompletionJsx.res.txt b/analysis/tests/src/expected/CompletionJsx.res.txt index fba67fac1..92c01db2e 100644 --- a/analysis/tests/src/expected/CompletionJsx.res.txt +++ b/analysis/tests/src/expected/CompletionJsx.res.txt @@ -12,18 +12,20 @@ Path Js.String2.st "label": "Js.String2.startsWith", "kind": 12, "tags": [], - "detail": "(t, t) => bool", + "detail": "(. t, t) => bool", "documentation": {"kind": "markdown", "value": "\nES2015: `startsWith(str, substr)` returns `true` if the `str` starts with\n`substr`, `false` otherwise.\n\nSee [`String.startsWith`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String/startsWith)\non MDN.\n\n```res example\nJs.String2.startsWith(\"BuckleScript\", \"Buckle\") == true\nJs.String2.startsWith(\"BuckleScript\", \"\") == true\nJs.String2.startsWith(\"JavaScript\", \"Buckle\") == false\n```\n"} }, { "label": "Js.String2.startsWithFrom", "kind": 12, "tags": [], - "detail": "(t, t, int) => bool", + "detail": "(. t, t, int) => bool", "documentation": {"kind": "markdown", "value": "\nES2015: `startsWithFrom(str, substr, n)` returns `true` if the `str` starts\nwith `substr` starting at position `n`, false otherwise. If `n` is negative,\nthe search starts at the beginning of `str`.\n\nSee [`String.startsWith`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String/startsWith)\non MDN.\n\n```res example\nJs.String2.startsWithFrom(\"BuckleScript\", \"kle\", 3) == true\nJs.String2.startsWithFrom(\"BuckleScript\", \"\", 3) == true\nJs.String2.startsWithFrom(\"JavaScript\", \"Buckle\", 2) == false\n```\n"} }] Complete src/CompletionJsx.res 13:21 posCursor:[13:21] posNoWhite:[13:20] Found expr:[8:13->33:3] +Pexp_construct Function$:__ghost__[0:-1->0:-1] [8:14->33:3] +posCursor:[13:21] posNoWhite:[13:20] Found expr:[8:14->33:3] posCursor:[13:21] posNoWhite:[13:20] Found expr:[9:4->32:10] posCursor:[13:21] posNoWhite:[13:20] Found expr:[10:4->32:10] posCursor:[13:21] posNoWhite:[13:20] Found expr:[11:4->32:10] @@ -50,18 +52,20 @@ Path Js.String2.st "label": "Js.String2.startsWith", "kind": 12, "tags": [], - "detail": "(t, t) => bool", + "detail": "(. t, t) => bool", "documentation": {"kind": "markdown", "value": "\nES2015: `startsWith(str, substr)` returns `true` if the `str` starts with\n`substr`, `false` otherwise.\n\nSee [`String.startsWith`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String/startsWith)\non MDN.\n\n```res example\nJs.String2.startsWith(\"BuckleScript\", \"Buckle\") == true\nJs.String2.startsWith(\"BuckleScript\", \"\") == true\nJs.String2.startsWith(\"JavaScript\", \"Buckle\") == false\n```\n"} }, { "label": "Js.String2.startsWithFrom", "kind": 12, "tags": [], - "detail": "(t, t, int) => bool", + "detail": "(. t, t, int) => bool", "documentation": {"kind": "markdown", "value": "\nES2015: `startsWithFrom(str, substr, n)` returns `true` if the `str` starts\nwith `substr` starting at position `n`, false otherwise. If `n` is negative,\nthe search starts at the beginning of `str`.\n\nSee [`String.startsWith`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String/startsWith)\non MDN.\n\n```res example\nJs.String2.startsWithFrom(\"BuckleScript\", \"kle\", 3) == true\nJs.String2.startsWithFrom(\"BuckleScript\", \"\", 3) == true\nJs.String2.startsWithFrom(\"JavaScript\", \"Buckle\", 2) == false\n```\n"} }] Complete src/CompletionJsx.res 18:24 posCursor:[18:24] posNoWhite:[18:23] Found expr:[8:13->33:3] +Pexp_construct Function$:__ghost__[0:-1->0:-1] [8:14->33:3] +posCursor:[18:24] posNoWhite:[18:23] Found expr:[8:14->33:3] posCursor:[18:24] posNoWhite:[18:23] Found expr:[9:4->32:10] posCursor:[18:24] posNoWhite:[18:23] Found expr:[10:4->32:10] posCursor:[18:24] posNoWhite:[18:23] Found expr:[11:4->32:10] @@ -98,18 +102,20 @@ Path Js.String2.st "label": "Js.String2.startsWith", "kind": 12, "tags": [], - "detail": "(t, t) => bool", + "detail": "(. t, t) => bool", "documentation": {"kind": "markdown", "value": "\nES2015: `startsWith(str, substr)` returns `true` if the `str` starts with\n`substr`, `false` otherwise.\n\nSee [`String.startsWith`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String/startsWith)\non MDN.\n\n```res example\nJs.String2.startsWith(\"BuckleScript\", \"Buckle\") == true\nJs.String2.startsWith(\"BuckleScript\", \"\") == true\nJs.String2.startsWith(\"JavaScript\", \"Buckle\") == false\n```\n"} }, { "label": "Js.String2.startsWithFrom", "kind": 12, "tags": [], - "detail": "(t, t, int) => bool", + "detail": "(. t, t, int) => bool", "documentation": {"kind": "markdown", "value": "\nES2015: `startsWithFrom(str, substr, n)` returns `true` if the `str` starts\nwith `substr` starting at position `n`, false otherwise. If `n` is negative,\nthe search starts at the beginning of `str`.\n\nSee [`String.startsWith`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String/startsWith)\non MDN.\n\n```res example\nJs.String2.startsWithFrom(\"BuckleScript\", \"kle\", 3) == true\nJs.String2.startsWithFrom(\"BuckleScript\", \"\", 3) == true\nJs.String2.startsWithFrom(\"JavaScript\", \"Buckle\", 2) == false\n```\n"} }] Complete src/CompletionJsx.res 20:27 posCursor:[20:27] posNoWhite:[20:26] Found expr:[8:13->33:3] +Pexp_construct Function$:__ghost__[0:-1->0:-1] [8:14->33:3] +posCursor:[20:27] posNoWhite:[20:26] Found expr:[8:14->33:3] posCursor:[20:27] posNoWhite:[20:26] Found expr:[9:4->32:10] posCursor:[20:27] posNoWhite:[20:26] Found expr:[10:4->32:10] posCursor:[20:27] posNoWhite:[20:26] Found expr:[11:4->32:10] @@ -145,18 +151,20 @@ Path Js.String2.st "label": "Js.String2.startsWith", "kind": 12, "tags": [], - "detail": "(t, t) => bool", + "detail": "(. t, t) => bool", "documentation": {"kind": "markdown", "value": "\nES2015: `startsWith(str, substr)` returns `true` if the `str` starts with\n`substr`, `false` otherwise.\n\nSee [`String.startsWith`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String/startsWith)\non MDN.\n\n```res example\nJs.String2.startsWith(\"BuckleScript\", \"Buckle\") == true\nJs.String2.startsWith(\"BuckleScript\", \"\") == true\nJs.String2.startsWith(\"JavaScript\", \"Buckle\") == false\n```\n"} }, { "label": "Js.String2.startsWithFrom", "kind": 12, "tags": [], - "detail": "(t, t, int) => bool", + "detail": "(. t, t, int) => bool", "documentation": {"kind": "markdown", "value": "\nES2015: `startsWithFrom(str, substr, n)` returns `true` if the `str` starts\nwith `substr` starting at position `n`, false otherwise. If `n` is negative,\nthe search starts at the beginning of `str`.\n\nSee [`String.startsWith`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String/startsWith)\non MDN.\n\n```res example\nJs.String2.startsWithFrom(\"BuckleScript\", \"kle\", 3) == true\nJs.String2.startsWithFrom(\"BuckleScript\", \"\", 3) == true\nJs.String2.startsWithFrom(\"JavaScript\", \"Buckle\", 2) == false\n```\n"} }] Complete src/CompletionJsx.res 22:44 posCursor:[22:44] posNoWhite:[22:43] Found expr:[8:13->33:3] +Pexp_construct Function$:__ghost__[0:-1->0:-1] [8:14->33:3] +posCursor:[22:44] posNoWhite:[22:43] Found expr:[8:14->33:3] posCursor:[22:44] posNoWhite:[22:43] Found expr:[9:4->32:10] posCursor:[22:44] posNoWhite:[22:43] Found expr:[10:4->32:10] posCursor:[22:44] posNoWhite:[22:43] Found expr:[11:4->32:10] @@ -194,18 +202,20 @@ Path Js.String2.st "label": "Js.String2.startsWith", "kind": 12, "tags": [], - "detail": "(t, t) => bool", + "detail": "(. t, t) => bool", "documentation": {"kind": "markdown", "value": "\nES2015: `startsWith(str, substr)` returns `true` if the `str` starts with\n`substr`, `false` otherwise.\n\nSee [`String.startsWith`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String/startsWith)\non MDN.\n\n```res example\nJs.String2.startsWith(\"BuckleScript\", \"Buckle\") == true\nJs.String2.startsWith(\"BuckleScript\", \"\") == true\nJs.String2.startsWith(\"JavaScript\", \"Buckle\") == false\n```\n"} }, { "label": "Js.String2.startsWithFrom", "kind": 12, "tags": [], - "detail": "(t, t, int) => bool", + "detail": "(. t, t, int) => bool", "documentation": {"kind": "markdown", "value": "\nES2015: `startsWithFrom(str, substr, n)` returns `true` if the `str` starts\nwith `substr` starting at position `n`, false otherwise. If `n` is negative,\nthe search starts at the beginning of `str`.\n\nSee [`String.startsWith`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String/startsWith)\non MDN.\n\n```res example\nJs.String2.startsWithFrom(\"BuckleScript\", \"kle\", 3) == true\nJs.String2.startsWithFrom(\"BuckleScript\", \"\", 3) == true\nJs.String2.startsWithFrom(\"JavaScript\", \"Buckle\", 2) == false\n```\n"} }] Complete src/CompletionJsx.res 24:19 posCursor:[24:19] posNoWhite:[24:18] Found expr:[8:13->33:3] +Pexp_construct Function$:__ghost__[0:-1->0:-1] [8:14->33:3] +posCursor:[24:19] posNoWhite:[24:18] Found expr:[8:14->33:3] posCursor:[24:19] posNoWhite:[24:18] Found expr:[9:4->32:10] posCursor:[24:19] posNoWhite:[24:18] Found expr:[10:4->32:10] posCursor:[24:19] posNoWhite:[24:18] Found expr:[11:4->32:10] @@ -242,54 +252,56 @@ Path Belt.Int. "label": "Belt.Int.fromString", "kind": 12, "tags": [], - "detail": "string => option", + "detail": "(. string) => option", "documentation": {"kind": "markdown", "value": "\n Converts a given `string` to an `int`. Returns `Some(int)` when the input is a number, `None` otherwise.\n\n ```res example\n Js.log(Belt.Int.fromString(\"1\") === Some(1)) /* true */\n ```\n"} }, { "label": "Belt.Int.*", "kind": 12, "tags": [], - "detail": "(int, int) => int", + "detail": "(. int, int) => int", "documentation": {"kind": "markdown", "value": "\n Multiplication of two `int` values. Same as the multiplication from `Pervasives`.\n\n ```res example\n open Belt.Int\n Js.log(2 * 2 === 4) /* true */\n ```\n"} }, { "label": "Belt.Int./", "kind": 12, "tags": [], - "detail": "(int, int) => int", + "detail": "(. int, int) => int", "documentation": {"kind": "markdown", "value": "\n Division of two `int` values. Same as the division from `Pervasives`.\n\n ```res example\n open Belt.Int\n Js.log(4 / 2 === 2); /* true */\n ```\n"} }, { "label": "Belt.Int.toString", "kind": 12, "tags": [], - "detail": "int => string", + "detail": "(. int) => string", "documentation": {"kind": "markdown", "value": "\n Converts a given `int` to a `string`. Uses the JavaScript `String` constructor under the hood.\n\n ```res example\n Js.log(Belt.Int.toString(1) === \"1\") /* true */\n ```\n"} }, { "label": "Belt.Int.toFloat", "kind": 12, "tags": [], - "detail": "int => float", + "detail": "(. int) => float", "documentation": {"kind": "markdown", "value": "\n Converts a given `int` to a `float`.\n\n ```res example\n Js.log(Belt.Int.toFloat(1) === 1.0) /* true */\n ```\n"} }, { "label": "Belt.Int.fromFloat", "kind": 12, "tags": [], - "detail": "float => int", + "detail": "(. float) => int", "documentation": {"kind": "markdown", "value": "\n Converts a given `float` to an `int`.\n\n ```res example\n Js.log(Belt.Int.fromFloat(1.0) === 1) /* true */\n ```\n"} }, { "label": "Belt.Int.-", "kind": 12, "tags": [], - "detail": "(int, int) => int", + "detail": "(. int, int) => int", "documentation": {"kind": "markdown", "value": "\n Subtraction of two `int` values. Same as the subtraction from `Pervasives`.\n\n ```res example\n open Belt.Int\n Js.log(2 - 1 === 1) /* true */\n ```\n"} }, { "label": "Belt.Int.+", "kind": 12, "tags": [], - "detail": "(int, int) => int", + "detail": "(. int, int) => int", "documentation": {"kind": "markdown", "value": "\n Addition of two `int` values. Same as the addition from `Pervasives`.\n\n ```res example\n open Belt.Int\n Js.log(2 + 2 === 4) /* true */\n ```\n"} }] Complete src/CompletionJsx.res 26:14 posCursor:[26:14] posNoWhite:[26:13] Found expr:[8:13->33:3] +Pexp_construct Function$:__ghost__[0:-1->0:-1] [8:14->33:3] +posCursor:[26:14] posNoWhite:[26:13] Found expr:[8:14->33:3] posCursor:[26:14] posNoWhite:[26:13] Found expr:[9:4->32:10] posCursor:[26:14] posNoWhite:[26:13] Found expr:[10:4->32:10] posCursor:[26:14] posNoWhite:[26:13] Found expr:[11:4->32:10] @@ -325,54 +337,56 @@ Path Belt.Int. "label": "Belt.Int.fromString", "kind": 12, "tags": [], - "detail": "string => option", + "detail": "(. string) => option", "documentation": {"kind": "markdown", "value": "\n Converts a given `string` to an `int`. Returns `Some(int)` when the input is a number, `None` otherwise.\n\n ```res example\n Js.log(Belt.Int.fromString(\"1\") === Some(1)) /* true */\n ```\n"} }, { "label": "Belt.Int.*", "kind": 12, "tags": [], - "detail": "(int, int) => int", + "detail": "(. int, int) => int", "documentation": {"kind": "markdown", "value": "\n Multiplication of two `int` values. Same as the multiplication from `Pervasives`.\n\n ```res example\n open Belt.Int\n Js.log(2 * 2 === 4) /* true */\n ```\n"} }, { "label": "Belt.Int./", "kind": 12, "tags": [], - "detail": "(int, int) => int", + "detail": "(. int, int) => int", "documentation": {"kind": "markdown", "value": "\n Division of two `int` values. Same as the division from `Pervasives`.\n\n ```res example\n open Belt.Int\n Js.log(4 / 2 === 2); /* true */\n ```\n"} }, { "label": "Belt.Int.toString", "kind": 12, "tags": [], - "detail": "int => string", + "detail": "(. int) => string", "documentation": {"kind": "markdown", "value": "\n Converts a given `int` to a `string`. Uses the JavaScript `String` constructor under the hood.\n\n ```res example\n Js.log(Belt.Int.toString(1) === \"1\") /* true */\n ```\n"} }, { "label": "Belt.Int.toFloat", "kind": 12, "tags": [], - "detail": "int => float", + "detail": "(. int) => float", "documentation": {"kind": "markdown", "value": "\n Converts a given `int` to a `float`.\n\n ```res example\n Js.log(Belt.Int.toFloat(1) === 1.0) /* true */\n ```\n"} }, { "label": "Belt.Int.fromFloat", "kind": 12, "tags": [], - "detail": "float => int", + "detail": "(. float) => int", "documentation": {"kind": "markdown", "value": "\n Converts a given `float` to an `int`.\n\n ```res example\n Js.log(Belt.Int.fromFloat(1.0) === 1) /* true */\n ```\n"} }, { "label": "Belt.Int.-", "kind": 12, "tags": [], - "detail": "(int, int) => int", + "detail": "(. int, int) => int", "documentation": {"kind": "markdown", "value": "\n Subtraction of two `int` values. Same as the subtraction from `Pervasives`.\n\n ```res example\n open Belt.Int\n Js.log(2 - 1 === 1) /* true */\n ```\n"} }, { "label": "Belt.Int.+", "kind": 12, "tags": [], - "detail": "(int, int) => int", + "detail": "(. int, int) => int", "documentation": {"kind": "markdown", "value": "\n Addition of two `int` values. Same as the addition from `Pervasives`.\n\n ```res example\n open Belt.Int\n Js.log(2 + 2 === 4) /* true */\n ```\n"} }] Complete src/CompletionJsx.res 28:20 posCursor:[28:20] posNoWhite:[28:19] Found expr:[8:13->33:3] +Pexp_construct Function$:__ghost__[0:-1->0:-1] [8:14->33:3] +posCursor:[28:20] posNoWhite:[28:19] Found expr:[8:14->33:3] posCursor:[28:20] posNoWhite:[28:19] Found expr:[9:4->32:10] posCursor:[28:20] posNoWhite:[28:19] Found expr:[10:4->32:10] posCursor:[28:20] posNoWhite:[28:19] Found expr:[11:4->32:10] @@ -409,12 +423,14 @@ Path Js.Array2.a "label": "Js.Array2.append", "kind": 12, "tags": [1], - "detail": "(t<'a>, 'a) => t<'a>", + "detail": "(. t<'a>, 'a) => t<'a>", "documentation": {"kind": "markdown", "value": "Deprecated: `append` is not type-safe. Use `concat` instead.\n\n"} }] Complete src/CompletionJsx.res 30:12 posCursor:[30:12] posNoWhite:[30:11] Found expr:[8:13->33:3] +Pexp_construct Function$:__ghost__[0:-1->0:-1] [8:14->33:3] +posCursor:[30:12] posNoWhite:[30:11] Found expr:[8:14->33:3] posCursor:[30:12] posNoWhite:[30:11] Found expr:[9:4->32:10] posCursor:[30:12] posNoWhite:[30:11] Found expr:[10:4->32:10] posCursor:[30:12] posNoWhite:[30:11] Found expr:[11:4->32:10] diff --git a/analysis/tests/src/expected/CompletionJsxProps.res.txt b/analysis/tests/src/expected/CompletionJsxProps.res.txt index 43a91f799..0b7d84df1 100644 --- a/analysis/tests/src/expected/CompletionJsxProps.res.txt +++ b/analysis/tests/src/expected/CompletionJsxProps.res.txt @@ -166,7 +166,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, @@ -189,12 +189,12 @@ 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 => {}", "kind": 12, "tags": [], - "detail": "JsxEventC.Mouse.t => unit", + "detail": "(. JsxEventU.Mouse.t) => unit", "documentation": null, "sortText": "A", "insertText": "{${1:event} => {$0}}", diff --git a/analysis/tests/src/expected/CompletionPipeChain.res.txt b/analysis/tests/src/expected/CompletionPipeChain.res.txt index 52bfb0631..8ea60db9b 100644 --- a/analysis/tests/src/expected/CompletionPipeChain.res.txt +++ b/analysis/tests/src/expected/CompletionPipeChain.res.txt @@ -362,13 +362,13 @@ Path Belt.Int.t "label": "Belt.Int.toString", "kind": 12, "tags": [], - "detail": "int => string", + "detail": "(. int) => string", "documentation": {"kind": "markdown", "value": "\n Converts a given `int` to a `string`. Uses the JavaScript `String` constructor under the hood.\n\n ```res example\n Js.log(Belt.Int.toString(1) === \"1\") /* true */\n ```\n"} }, { "label": "Belt.Int.toFloat", "kind": 12, "tags": [], - "detail": "int => float", + "detail": "(. int) => float", "documentation": {"kind": "markdown", "value": "\n Converts a given `int` to a `float`.\n\n ```res example\n Js.log(Belt.Int.toFloat(1) === 1.0) /* true */\n ```\n"} }] @@ -440,6 +440,8 @@ Complete src/CompletionPipeChain.res 82:30 posCursor:[82:30] posNoWhite:[82:29] Found expr:[76:15->93:1] Pexp_apply ...[76:15->76:46] (~prepare77:3->77:10=...[77:11->77:24], ~render78:3->78:9=...[78:10->91:3], ...[92:2->92:4]) posCursor:[82:30] posNoWhite:[82:29] Found expr:[78:10->91:3] +Pexp_construct Function$:__ghost__[0:-1->0:-1] [78:10->91:3] +posCursor:[82:30] posNoWhite:[82:29] Found expr:[78:10->91:3] posCursor:[82:30] posNoWhite:[82:29] Found expr:[79:4->90:14] posCursor:[82:30] posNoWhite:[82:29] Found expr:[82:7->90:14] posCursor:[82:30] posNoWhite:[82:29] Found expr:[82:7->82:30] @@ -467,6 +469,8 @@ Complete src/CompletionPipeChain.res 88:16 posCursor:[88:16] posNoWhite:[88:15] Found expr:[76:15->93:1] Pexp_apply ...[76:15->76:46] (~prepare77:3->77:10=...[77:11->77:24], ~render78:3->78:9=...[78:10->91:3], ...[92:2->92:4]) posCursor:[88:16] posNoWhite:[88:15] Found expr:[78:10->91:3] +Pexp_construct Function$:__ghost__[0:-1->0:-1] [78:10->91:3] +posCursor:[88:16] posNoWhite:[88:15] Found expr:[78:10->91:3] posCursor:[88:16] posNoWhite:[88:15] Found expr:[79:4->90:14] posCursor:[88:16] posNoWhite:[88:15] Found expr:[84:4->90:14] posCursor:[88:16] posNoWhite:[88:15] Found expr:[85:4->90:14] diff --git a/analysis/tests/src/expected/CompletionTypeAnnotation.res.txt b/analysis/tests/src/expected/CompletionTypeAnnotation.res.txt index cb0319ed2..f6add19e0 100644 --- a/analysis/tests/src/expected/CompletionTypeAnnotation.res.txt +++ b/analysis/tests/src/expected/CompletionTypeAnnotation.res.txt @@ -145,7 +145,7 @@ Path someFunc "label": "(v1, v2) => {}", "kind": 12, "tags": [], - "detail": "(int, string) => bool", + "detail": "(. int, string) => bool", "documentation": null, "sortText": "A", "insertText": "(${1:v1}, ${2:v2}) => {$0}", diff --git a/analysis/tests/src/expected/CreateInterface.res.txt b/analysis/tests/src/expected/CreateInterface.res.txt index 4e1212948..d48442879 100644 --- a/analysis/tests/src/expected/CreateInterface.res.txt +++ b/analysis/tests/src/expected/CreateInterface.res.txt @@ -1,6 +1,6 @@ Create Interface src/CreateInterface.res type r = {name: string, age: int} -let add: (~x: int, ~y: int) => int +let add: (. ~x: int, ~y: int) => int @react.component let make: (~name: string) => React.element module Other: { diff --git a/analysis/tests/src/expected/Debug.res.txt b/analysis/tests/src/expected/Debug.res.txt index 1f4ab58da..2dc9ff6f2 100644 --- a/analysis/tests/src/expected/Debug.res.txt +++ b/analysis/tests/src/expected/Debug.res.txt @@ -1,8 +1,8 @@ Definition src/Debug.res 2:20 -{"uri": "belt_List.mli", "range": {"start": {"line": 245, "character": 4}, "end": {"line": 245, "character": 7}}} +{"uri": "belt_List.resi", "range": {"start": {"line": 252, "character": 4}, "end": {"line": 252, "character": 7}}} Definition src/Debug.res 5:14 -{"uri": "list.mli", "range": {"start": {"line": 116, "character": 4}, "end": {"line": 116, "character": 7}}} +{"uri": "list.res", "range": {"start": {"line": 117, "character": 4}, "end": {"line": 117, "character": 7}}} Complete src/Debug.res 14:8 posCursor:[14:8] posNoWhite:[14:7] Found expr:[14:5->14:8] @@ -17,13 +17,13 @@ Path eqN "label": "eqNullable", "kind": 12, "tags": [], - "detail": "('a, nullable<'a>) => bool", + "detail": "(. 'a, nullable<'a>) => bool", "documentation": null }, { "label": "eqNull", "kind": 12, "tags": [], - "detail": "('a, null<'a>) => bool", + "detail": "(. 'a, null<'a>) => bool", "documentation": null }] diff --git a/analysis/tests/src/expected/Definition.res.txt b/analysis/tests/src/expected/Definition.res.txt index 158b7d271..834648700 100644 --- a/analysis/tests/src/expected/Definition.res.txt +++ b/analysis/tests/src/expected/Definition.res.txt @@ -5,13 +5,13 @@ Definition src/Definition.res 10:23 {"uri": "Definition.res", "range": {"start": {"line": 6, "character": 7}, "end": {"line": 6, "character": 13}}} Hover src/Definition.res 14:14 -{"contents": {"kind": "markdown", "value": "```rescript\n('a => 'b, list<'a>) => list<'b>\n```\n\n [List.map f [a1; ...; an]] applies function [f] to [a1, ..., an],\n and builds the list [[f a1; ...; f an]]\n with the results returned by [f]. Not tail-recursive. "}} +{"contents": {"kind": "markdown", "value": "```rescript\n(. (. 'a) => 'b, list<'a>) => list<'b>\n```\n\n [List.map f [a1; ...; an]] applies function [f] to [a1, ..., an],\n and builds the list [[f a1; ...; f an]]\n with the results returned by [f]. Not tail-recursive. "}} Hover src/Definition.res 18:14 -{"contents": {"kind": "markdown", "value": "```rescript\n(Belt.List.t<'a>, 'a => 'b) => Belt.List.t<'b>\n```\n\n---\n\n```\n \n```\n```rescript\ntype Belt.List.t<'a> = list<'a>\n```\nGo to: [Type definition](command:rescript-vscode.go_to_location?%5B%22belt_List.mli%22%2C34%2C0%5D)\n\n\n\n Returns a new list with `f` applied to each element of `someList`.\n\n ```res example\n list{1, 2}->Belt.List.map(x => x + 1) // list{3, 4}\n ```\n"}} +{"contents": {"kind": "markdown", "value": "```rescript\n(. Belt.List.t<'a>, (. 'a) => 'b) => Belt.List.t<'b>\n```\n\n---\n\n```\n \n```\n```rescript\ntype Belt.List.t<'a> = list<'a>\n```\nGo to: [Type definition](command:rescript-vscode.go_to_location?%5B%22belt_List.resi%22%2C35%2C0%5D)\n\n\n\n Returns a new list with `f` applied to each element of `someList`.\n\n ```res example\n list{1, 2}->Belt.List.map(x => x + 1) // list{3, 4}\n ```\n"}} Hover src/Definition.res 23:3 -{"contents": {"kind": "markdown", "value": "```rescript\n(. int, int) => int\n```"}} +{"contents": {"kind": "markdown", "value": "```rescript\n(int, int) => int\n```"}} Definition src/Definition.res 26:3 {"uri": "Definition.res", "range": {"start": {"line": 21, "character": 4}, "end": {"line": 21, "character": 13}}} diff --git a/analysis/tests/src/expected/Destructuring.res.txt b/analysis/tests/src/expected/Destructuring.res.txt index 978a78816..931b3e9f4 100644 --- a/analysis/tests/src/expected/Destructuring.res.txt +++ b/analysis/tests/src/expected/Destructuring.res.txt @@ -36,6 +36,8 @@ Path x Complete src/Destructuring.res 11:13 posCursor:[11:13] posNoWhite:[11:11] Found expr:[10:8->14:1] +Pexp_construct Function$:__ghost__[0:-1->0:-1] [10:9->14:1] +posCursor:[11:13] posNoWhite:[11:11] Found expr:[10:9->14:1] posCursor:[11:13] posNoWhite:[11:11] Found expr:[11:2->13:6] posCursor:[11:13] posNoWhite:[11:11] Found pattern:[11:6->11:14] Completable: Cpattern Value[x]->recordBody @@ -53,6 +55,8 @@ Path x Complete src/Destructuring.res 17:10 posCursor:[17:10] posNoWhite:[17:9] Found expr:[16:9->20:1] +Pexp_construct Function$:__ghost__[0:-1->0:-1] [16:10->20:1] +posCursor:[17:10] posNoWhite:[17:9] Found expr:[16:10->20:1] posCursor:[17:10] posNoWhite:[17:9] Found expr:[17:5->19:11] posCursor:[17:10] posNoWhite:[17:9] Found pattern:[17:9->17:11] Completable: Cpattern Value[x]->recordBody diff --git a/analysis/tests/src/expected/Hover.res.txt b/analysis/tests/src/expected/Hover.res.txt index e56cbe0f2..e80f641da 100644 --- a/analysis/tests/src/expected/Hover.res.txt +++ b/analysis/tests/src/expected/Hover.res.txt @@ -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\nunit => 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```"}} +{"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\nunit => unit => int\n```"}} Hover src/Hover.res 144:9 {"contents": {"kind": "markdown", "value": "```rescript\nint\n```\n\ndoc comment 1"}} diff --git a/analysis/tests/src/expected/Jsx2.resi.txt b/analysis/tests/src/expected/Jsx2.resi.txt index 1dc85a0e9..e7f65b414 100644 --- a/analysis/tests/src/expected/Jsx2.resi.txt +++ b/analysis/tests/src/expected/Jsx2.resi.txt @@ -1,7 +1,7 @@ Hover src/Jsx2.resi 1:4 getLocItem #1: heuristic for makeProps in interface files n1:componentLike n2:unit n3:string -{"contents": {"kind": "markdown", "value": "```rescript\n(~first: string, ~key: string=?, unit) => {\"first\": string}\n```"}} +{"contents": {"kind": "markdown", "value": "```rescript\n(.\n ~first: string,\n ~key: string=?,\n unit,\n) => {\"first\": string}\n```"}} Hover src/Jsx2.resi 4:4 {"contents": {"kind": "markdown", "value": "```rescript\nint\n```"}} diff --git a/analysis/tests/src/expected/JsxV4.res.txt b/analysis/tests/src/expected/JsxV4.res.txt index 9c9bb9d37..b265b8580 100644 --- a/analysis/tests/src/expected/JsxV4.res.txt +++ b/analysis/tests/src/expected/JsxV4.res.txt @@ -22,14 +22,14 @@ Hover src/JsxV4.res 14:9 Create Interface src/JsxV4.res module M4: { @react.component - let make: (~first: string, ~fun: string=?, ~second: string=?) => React.element + let make: (. ~first: string, ~fun: string=?, ~second: string=?) => React.element } module MM: { @react.component - let make: unit => React.element + let make: (. unit) => React.element } module Other: { @react.component - let make: (~name: string) => React.element + let make: (. ~name: string) => React.element } diff --git a/analysis/tests/src/expected/RecordCompletion.res.txt b/analysis/tests/src/expected/RecordCompletion.res.txt index f8ae52243..d98a0262f 100644 --- a/analysis/tests/src/expected/RecordCompletion.res.txt +++ b/analysis/tests/src/expected/RecordCompletion.res.txt @@ -13,13 +13,13 @@ Path Js.Array2.m "label": "Js.Array2.mapi", "kind": 12, "tags": [], - "detail": "(t<'a>, ('a, int) => 'b) => t<'b>", + "detail": "(. t<'a>, (. 'a, int) => 'b) => t<'b>", "documentation": {"kind": "markdown", "value": "\nApplies the function (the second argument) to each item in the array, returning\na new array. The function acceps two arguments: an item from the array and its\nindex number. The result array does not have to have elements of the same type\nas the input array. See\n[`Array.map`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/map)\non MDN.\n\n```res example\n// multiply each item in array by its position\nlet product = (item, index) => item * index\nJs.Array2.mapi([10, 11, 12], product) == [0, 11, 24]\n```\n"} }, { "label": "Js.Array2.map", "kind": 12, "tags": [], - "detail": "(t<'a>, 'a => 'b) => t<'b>", + "detail": "(. t<'a>, (. 'a) => 'b) => t<'b>", "documentation": {"kind": "markdown", "value": "\nApplies the function (the second argument) to each item in the array, returning\na new array. The result array does not have to have elements of the same type\nas the input array. See\n[`Array.map`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/map)\non MDN.\n\n```res example\nJs.Array2.map([12, 4, 8], x => x * x) == [144, 16, 64]\nJs.Array2.map([\"animal\", \"vegetable\", \"mineral\"], Js.String.length) == [6, 9, 7]\n```\n"} }] @@ -39,13 +39,13 @@ Path Js.Array2.m "label": "Js.Array2.mapi", "kind": 12, "tags": [], - "detail": "(t<'a>, ('a, int) => 'b) => t<'b>", + "detail": "(. t<'a>, (. 'a, int) => 'b) => t<'b>", "documentation": {"kind": "markdown", "value": "\nApplies the function (the second argument) to each item in the array, returning\na new array. The function acceps two arguments: an item from the array and its\nindex number. The result array does not have to have elements of the same type\nas the input array. See\n[`Array.map`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/map)\non MDN.\n\n```res example\n// multiply each item in array by its position\nlet product = (item, index) => item * index\nJs.Array2.mapi([10, 11, 12], product) == [0, 11, 24]\n```\n"} }, { "label": "Js.Array2.map", "kind": 12, "tags": [], - "detail": "(t<'a>, 'a => 'b) => t<'b>", + "detail": "(. t<'a>, (. 'a) => 'b) => t<'b>", "documentation": {"kind": "markdown", "value": "\nApplies the function (the second argument) to each item in the array, returning\na new array. The result array does not have to have elements of the same type\nas the input array. See\n[`Array.map`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/map)\non MDN.\n\n```res example\nJs.Array2.map([12, 4, 8], x => x * x) == [144, 16, 64]\nJs.Array2.map([\"animal\", \"vegetable\", \"mineral\"], Js.String.length) == [6, 9, 7]\n```\n"} }] diff --git a/analysis/tests/src/expected/SignatureHelp.res.txt b/analysis/tests/src/expected/SignatureHelp.res.txt index 2dd482881..051a2476e 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```"}}], + "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```"}}], + "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```"}}], + "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```"}}], + "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```"}}], + "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```"}}], + "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```"}}] + "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```"}}] + "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```"}}] + "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```"}}] + "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```"}}] + "parameters": [] }], "activeSignature": 0, "activeParameter": 0 @@ -263,16 +257,16 @@ Package opens Pervasives.JsxModules.place holder Resolved opens 1 pervasives ContextPath Value[otherFunc] Path otherFunc -argAtCursor: unlabelled<1> +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```"}}] + "parameters": [] }], "activeSignature": 0, - "activeParameter": 1 + "activeParameter": 0 } Signature help src/SignatureHelp.res 62:17 @@ -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```"}}] + "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```"}}] + "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```"}}] + "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```"}}] + "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```"}}], + "parameters": [], "documentation": {"kind": "markdown", "value": " Does stuff. "} }], "activeSignature": 0, diff --git a/analysis/vendor/ml/printtyp.ml b/analysis/vendor/ml/printtyp.ml index 1f6a5da34..74a5c694a 100644 --- a/analysis/vendor/ml/printtyp.ml +++ b/analysis/vendor/ml/printtyp.ml @@ -49,10 +49,11 @@ let ident ppf id = pp_print_string ppf (ident_name id) (* Print a path *) let ident_pervasives = Ident.create_persistent "Pervasives" +let ident_pervasives_u = Ident.create_persistent "PervasivesU" let printing_env = ref Env.empty let non_shadowed_pervasive = function | Pdot(Pident id, s, _pos) as path -> - Ident.same id ident_pervasives && + (Ident.same id ident_pervasives || Ident.same id ident_pervasives_u) && (try Path.same path (Env.lookup_type (Lident s) !printing_env) with Not_found -> true) | _ -> false From f11b5eadce5651147e1f6f786e2c0c80111f37fb Mon Sep 17 00:00:00 2001 From: Gabriel Nordeborn Date: Thu, 17 Aug 2023 12:55:00 +0200 Subject: [PATCH 02/11] remove explicit signature help uncurried test file --- analysis/tests/src/SignatureHelpUncurried.res | 78 ---- .../tests/src/expected/SignatureHelp.res.txt | 72 ++-- .../expected/SignatureHelpUncurried.res.txt | 396 ------------------ 3 files changed, 36 insertions(+), 510 deletions(-) delete mode 100644 analysis/tests/src/SignatureHelpUncurried.res delete mode 100644 analysis/tests/src/expected/SignatureHelpUncurried.res.txt diff --git a/analysis/tests/src/SignatureHelpUncurried.res b/analysis/tests/src/SignatureHelpUncurried.res deleted file mode 100644 index fea6b8dfd..000000000 --- a/analysis/tests/src/SignatureHelpUncurried.res +++ /dev/null @@ -1,78 +0,0 @@ -@@uncurried - -type someVariant = One | Two | Three - -/** Does stuff. */ -let someFunc = (one: int, ~two: option=?, ~three: unit => unit, ~four: someVariant, ()) => { - ignore(one) - ignore(two) - ignore(three()) - ignore(four) -} - -let otherFunc = (first: string, second: int, third: float) => { - ignore(first) - ignore(second) - ignore(third) -} - -// let _ = someFunc( -// ^she - -// let _ = someFunc(1 -// ^she - -// let _ = someFunc(123, ~two -// ^she - -// let _ = someFunc(123, ~two="123" -// ^she - -// let _ = someFunc(123, ~two="123", ~four -// ^she - -// let _ = someFunc(123, ~two="123", ~four=O -// ^she - -// let _ = otherFunc( -// ^she - -// let _ = otherFunc("123" -// ^she - -// let _ = otherFunc("123", 123, 123.0) -// ^she - -// let _ = Completion.Lib.foo(~age -// ^she - -let iAmSoSpecial = (iJustHaveOneArg: string) => { - ignore(iJustHaveOneArg) -} - -// let _ = iAmSoSpecial( -// ^she - -// let _ = "hello"->otherFunc(1 -// ^she - -let fn = (age: int, name: string, year: int) => { - ignore(age) - ignore(name) - ignore(year) -} - -// let _ = fn(22, ) -// ^she - -// let _ = fn(22, , 2023) -// ^she - -// let _ = fn(12, "hello", ) -// ^she - -// let _ = fn({ iAmSoSpecial() }) -// ^she - -// let _ = fn({ iAmSoSpecial({ someFunc() }) }) -// ^she diff --git a/analysis/tests/src/expected/SignatureHelp.res.txt b/analysis/tests/src/expected/SignatureHelp.res.txt index 051a2476e..2a7811df6 100644 --- a/analysis/tests/src/expected/SignatureHelp.res.txt +++ b/analysis/tests/src/expected/SignatureHelp.res.txt @@ -10,11 +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": [], + "parameters": [{"label": [4, 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": "```rescript\nunit => unit\n```"}}, {"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```"}}], "documentation": {"kind": "markdown", "value": " Does stuff. "} }], "activeSignature": 0, @@ -33,11 +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": [], + "parameters": [{"label": [4, 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": "```rescript\nunit => unit\n```"}}, {"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```"}}], "documentation": {"kind": "markdown", "value": " Does stuff. "} }], "activeSignature": 0, @@ -56,11 +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": [], + "parameters": [{"label": [4, 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": "```rescript\nunit => unit\n```"}}, {"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```"}}], "documentation": {"kind": "markdown", "value": " Does stuff. "} }], "activeSignature": 0, @@ -79,11 +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": [], + "parameters": [{"label": [4, 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": "```rescript\nunit => unit\n```"}}, {"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```"}}], "documentation": {"kind": "markdown", "value": " Does stuff. "} }], "activeSignature": 0, @@ -102,11 +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": [], + "parameters": [{"label": [4, 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": "```rescript\nunit => unit\n```"}}, {"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```"}}], "documentation": {"kind": "markdown", "value": " Does stuff. "} }], "activeSignature": 0, @@ -125,11 +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": [], + "parameters": [{"label": [4, 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": "```rescript\nunit => unit\n```"}}, {"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```"}}], "documentation": {"kind": "markdown", "value": " Does stuff. "} }], "activeSignature": 0, @@ -148,11 +148,11 @@ ContextPath Value[otherFunc] Path otherFunc argAtCursor: unlabelled<0> extracted params: -[] +[string, int, float] { "signatures": [{ "label": "(string, int, float) => unit", - "parameters": [] + "parameters": [{"label": [1, 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```"}}] }], "activeSignature": 0, "activeParameter": 0 @@ -170,11 +170,11 @@ ContextPath Value[otherFunc] Path otherFunc argAtCursor: unlabelled<0> extracted params: -[] +[string, int, float] { "signatures": [{ "label": "(string, int, float) => unit", - "parameters": [] + "parameters": [{"label": [1, 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```"}}] }], "activeSignature": 0, "activeParameter": 0 @@ -192,11 +192,11 @@ ContextPath Value[otherFunc] Path otherFunc argAtCursor: unlabelled<2> extracted params: -[] +[string, int, float] { "signatures": [{ "label": "(string, int, float) => unit", - "parameters": [] + "parameters": [{"label": [1, 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```"}}] }], "activeSignature": 0, "activeParameter": 2 @@ -214,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": [] + "parameters": [{"label": [1, 10], "documentation": {"kind": "markdown", "value": "```rescript\nint\n```"}}, {"label": [12, 25], "documentation": {"kind": "markdown", "value": "```rescript\nstring\n```"}}] }], "activeSignature": 0, "activeParameter": 0 @@ -236,11 +236,11 @@ ContextPath Value[iAmSoSpecial] Path iAmSoSpecial argAtCursor: unlabelled<0> extracted params: -[] +[string] { "signatures": [{ "label": "string => unit", - "parameters": [] + "parameters": [{"label": [0, 6], "documentation": {"kind": "markdown", "value": "```rescript\nstring\n```"}}] }], "activeSignature": 0, "activeParameter": 0 @@ -257,16 +257,16 @@ Package opens Pervasives.JsxModules.place holder Resolved opens 1 pervasives ContextPath Value[otherFunc] Path otherFunc -argAtCursor: unlabelled<0> +argAtCursor: unlabelled<1> extracted params: -[] +[string, int, float] { "signatures": [{ "label": "(string, int, float) => unit", - "parameters": [] + "parameters": [{"label": [1, 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```"}}] }], "activeSignature": 0, - "activeParameter": 0 + "activeParameter": 1 } Signature help src/SignatureHelp.res 62:17 @@ -281,11 +281,11 @@ ContextPath Value[fn] Path fn argAtCursor: unlabelled<1> extracted params: -[] +[int, string, int] { "signatures": [{ "label": "(int, string, int) => unit", - "parameters": [] + "parameters": [{"label": [1, 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```"}}] }], "activeSignature": 0, "activeParameter": 1 @@ -303,11 +303,11 @@ ContextPath Value[fn] Path fn argAtCursor: unlabelled<1> extracted params: -[] +[int, string, int] { "signatures": [{ "label": "(int, string, int) => unit", - "parameters": [] + "parameters": [{"label": [1, 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```"}}] }], "activeSignature": 0, "activeParameter": 1 @@ -325,11 +325,11 @@ ContextPath Value[fn] Path fn argAtCursor: unlabelled<2> extracted params: -[] +[int, string, int] { "signatures": [{ "label": "(int, string, int) => unit", - "parameters": [] + "parameters": [{"label": [1, 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```"}}] }], "activeSignature": 0, "activeParameter": 2 @@ -349,11 +349,11 @@ ContextPath Value[iAmSoSpecial] Path iAmSoSpecial argAtCursor: unlabelled<0> extracted params: -[] +[string] { "signatures": [{ "label": "string => unit", - "parameters": [] + "parameters": [{"label": [0, 6], "documentation": {"kind": "markdown", "value": "```rescript\nstring\n```"}}] }], "activeSignature": 0, "activeParameter": 0 @@ -375,11 +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": [], + "parameters": [{"label": [4, 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": "```rescript\nunit => unit\n```"}}, {"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```"}}], "documentation": {"kind": "markdown", "value": " Does stuff. "} }], "activeSignature": 0, diff --git a/analysis/tests/src/expected/SignatureHelpUncurried.res.txt b/analysis/tests/src/expected/SignatureHelpUncurried.res.txt deleted file mode 100644 index be2ba4290..000000000 --- a/analysis/tests/src/expected/SignatureHelpUncurried.res.txt +++ /dev/null @@ -1,396 +0,0 @@ -Signature help src/SignatureHelpUncurried.res 18:20 -posCursor:[18:19] posNoWhite:[18:18] Found expr:[18:11->18:20] -Pexp_apply ...[18:11->18:19] (...[48:0->18:20]) -posCursor:[18:19] posNoWhite:[18:18] Found expr:[18:11->18:19] -Pexp_ident someFunc:[18:11->18:19] -Completable: Cpath Value[someFunc] -Package opens Pervasives.JsxModules.place holder -Resolved opens 1 pervasives -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": [1, 8], "documentation": {"kind": "markdown", "value": "```rescript\nint\n```"}}, {"label": [12, 26], "documentation": {"kind": "markdown", "value": "```rescript\noption\n```"}}, {"label": [30, 54], "documentation": {"kind": "markdown", "value": "```rescript\n(. unit) => unit\n```"}}, {"label": [58, 76], "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%22SignatureHelpUncurried.res%22%2C2%2C0%5D)"}}, {"label": [80, 84], "documentation": {"kind": "markdown", "value": "```rescript\nint\n```"}}], - "documentation": {"kind": "markdown", "value": " Does stuff. "} - }], - "activeSignature": 0, - "activeParameter": 0 -} - -Signature help src/SignatureHelpUncurried.res 21:21 -posCursor:[21:19] posNoWhite:[21:18] Found expr:[21:11->21:21] -Pexp_apply ...[21:11->21:19] (...[21:20->21:21]) -posCursor:[21:19] posNoWhite:[21:18] Found expr:[21:11->21:19] -Pexp_ident someFunc:[21:11->21:19] -Completable: Cpath Value[someFunc] -Package opens Pervasives.JsxModules.place holder -Resolved opens 1 pervasives -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": [1, 8], "documentation": {"kind": "markdown", "value": "```rescript\nint\n```"}}, {"label": [12, 26], "documentation": {"kind": "markdown", "value": "```rescript\noption\n```"}}, {"label": [30, 54], "documentation": {"kind": "markdown", "value": "```rescript\n(. unit) => unit\n```"}}, {"label": [58, 76], "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%22SignatureHelpUncurried.res%22%2C2%2C0%5D)"}}, {"label": [80, 84], "documentation": {"kind": "markdown", "value": "```rescript\nint\n```"}}], - "documentation": {"kind": "markdown", "value": " Does stuff. "} - }], - "activeSignature": 0, - "activeParameter": 0 -} - -Signature help src/SignatureHelpUncurried.res 24:29 -posCursor:[24:19] posNoWhite:[24:18] Found expr:[24:11->24:29] -Pexp_apply ...[24:11->24:19] (...[24:20->24:23], ~two24:26->24:29=...[24:26->24:29]) -posCursor:[24:19] posNoWhite:[24:18] Found expr:[24:11->24:19] -Pexp_ident someFunc:[24:11->24:19] -Completable: Cpath Value[someFunc] -Package opens Pervasives.JsxModules.place holder -Resolved opens 1 pervasives -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": [1, 8], "documentation": {"kind": "markdown", "value": "```rescript\nint\n```"}}, {"label": [12, 26], "documentation": {"kind": "markdown", "value": "```rescript\noption\n```"}}, {"label": [30, 54], "documentation": {"kind": "markdown", "value": "```rescript\n(. unit) => unit\n```"}}, {"label": [58, 76], "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%22SignatureHelpUncurried.res%22%2C2%2C0%5D)"}}, {"label": [80, 84], "documentation": {"kind": "markdown", "value": "```rescript\nint\n```"}}], - "documentation": {"kind": "markdown", "value": " Does stuff. "} - }], - "activeSignature": 0, - "activeParameter": 1 -} - -Signature help src/SignatureHelpUncurried.res 27:33 -posCursor:[27:19] posNoWhite:[27:18] Found expr:[27:11->27:35] -Pexp_apply ...[27:11->27:19] (...[27:20->27:23], ~two27:26->27:29=...[27:30->27:35]) -posCursor:[27:19] posNoWhite:[27:18] Found expr:[27:11->27:19] -Pexp_ident someFunc:[27:11->27:19] -Completable: Cpath Value[someFunc] -Package opens Pervasives.JsxModules.place holder -Resolved opens 1 pervasives -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": [1, 8], "documentation": {"kind": "markdown", "value": "```rescript\nint\n```"}}, {"label": [12, 26], "documentation": {"kind": "markdown", "value": "```rescript\noption\n```"}}, {"label": [30, 54], "documentation": {"kind": "markdown", "value": "```rescript\n(. unit) => unit\n```"}}, {"label": [58, 76], "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%22SignatureHelpUncurried.res%22%2C2%2C0%5D)"}}, {"label": [80, 84], "documentation": {"kind": "markdown", "value": "```rescript\nint\n```"}}], - "documentation": {"kind": "markdown", "value": " Does stuff. "} - }], - "activeSignature": 0, - "activeParameter": 1 -} - -Signature help src/SignatureHelpUncurried.res 30:38 -posCursor:[30:19] posNoWhite:[30:18] Found expr:[30:11->30:42] -Pexp_apply ...[30:11->30:19] (...[30:20->30:23], ~two30:26->30:29=...[30:30->30:35], ~four30:38->30:42=...[30:38->30:42]) -posCursor:[30:19] posNoWhite:[30:18] Found expr:[30:11->30:19] -Pexp_ident someFunc:[30:11->30:19] -Completable: Cpath Value[someFunc] -Package opens Pervasives.JsxModules.place holder -Resolved opens 1 pervasives -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": [1, 8], "documentation": {"kind": "markdown", "value": "```rescript\nint\n```"}}, {"label": [12, 26], "documentation": {"kind": "markdown", "value": "```rescript\noption\n```"}}, {"label": [30, 54], "documentation": {"kind": "markdown", "value": "```rescript\n(. unit) => unit\n```"}}, {"label": [58, 76], "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%22SignatureHelpUncurried.res%22%2C2%2C0%5D)"}}, {"label": [80, 84], "documentation": {"kind": "markdown", "value": "```rescript\nint\n```"}}], - "documentation": {"kind": "markdown", "value": " Does stuff. "} - }], - "activeSignature": 0, - "activeParameter": 3 -} - -Signature help src/SignatureHelpUncurried.res 33:42 -posCursor:[33:19] posNoWhite:[33:18] Found expr:[33:11->33:44] -Pexp_apply ...[33:11->33:19] (...[33:20->33:23], ~two33:26->33:29=...[33:30->33:35], ~four33:38->33:42=...[33:43->33:44]) -posCursor:[33:19] posNoWhite:[33:18] Found expr:[33:11->33:19] -Pexp_ident someFunc:[33:11->33:19] -Completable: Cpath Value[someFunc] -Package opens Pervasives.JsxModules.place holder -Resolved opens 1 pervasives -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": [1, 8], "documentation": {"kind": "markdown", "value": "```rescript\nint\n```"}}, {"label": [12, 26], "documentation": {"kind": "markdown", "value": "```rescript\noption\n```"}}, {"label": [30, 54], "documentation": {"kind": "markdown", "value": "```rescript\n(. unit) => unit\n```"}}, {"label": [58, 76], "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%22SignatureHelpUncurried.res%22%2C2%2C0%5D)"}}, {"label": [80, 84], "documentation": {"kind": "markdown", "value": "```rescript\nint\n```"}}], - "documentation": {"kind": "markdown", "value": " Does stuff. "} - }], - "activeSignature": 0, - "activeParameter": 3 -} - -Signature help src/SignatureHelpUncurried.res 36:21 -posCursor:[36:20] posNoWhite:[36:19] Found expr:[36:11->36:21] -Pexp_apply ...[36:11->36:20] (...[48:0->36:21]) -posCursor:[36:20] posNoWhite:[36:19] Found expr:[36:11->36:20] -Pexp_ident otherFunc:[36:11->36:20] -Completable: Cpath Value[otherFunc] -Package opens Pervasives.JsxModules.place holder -Resolved opens 1 pervasives -ContextPath Value[otherFunc] -Path otherFunc -argAtCursor: unlabelled<0> -extracted params: -[. string, int, float] -{ - "signatures": [{ - "label": "(. string, int, float) => unit", - "parameters": [{"label": [1, 9], "documentation": {"kind": "markdown", "value": "```rescript\nstring\n```"}}, {"label": [11, 14], "documentation": {"kind": "markdown", "value": "```rescript\nstring\n```"}}, {"label": [16, 21], "documentation": {"kind": "markdown", "value": "```rescript\nstring\n```"}}] - }], - "activeSignature": 0, - "activeParameter": 0 -} - -Signature help src/SignatureHelpUncurried.res 39:24 -posCursor:[39:20] posNoWhite:[39:19] Found expr:[39:11->39:26] -Pexp_apply ...[39:11->39:20] (...[39:21->39:26]) -posCursor:[39:20] posNoWhite:[39:19] Found expr:[39:11->39:20] -Pexp_ident otherFunc:[39:11->39:20] -Completable: Cpath Value[otherFunc] -Package opens Pervasives.JsxModules.place holder -Resolved opens 1 pervasives -ContextPath Value[otherFunc] -Path otherFunc -argAtCursor: unlabelled<0> -extracted params: -[. string, int, float] -{ - "signatures": [{ - "label": "(. string, int, float) => unit", - "parameters": [{"label": [1, 9], "documentation": {"kind": "markdown", "value": "```rescript\nstring\n```"}}, {"label": [11, 14], "documentation": {"kind": "markdown", "value": "```rescript\nstring\n```"}}, {"label": [16, 21], "documentation": {"kind": "markdown", "value": "```rescript\nstring\n```"}}] - }], - "activeSignature": 0, - "activeParameter": 0 -} - -Signature help src/SignatureHelpUncurried.res 42:35 -posCursor:[42:20] posNoWhite:[42:19] Found expr:[42:11->42:39] -Pexp_apply ...[42:11->42:20] (...[42:21->42:26], ...[42:28->42:31], ...[42:33->42:38]) -posCursor:[42:20] posNoWhite:[42:19] Found expr:[42:11->42:20] -Pexp_ident otherFunc:[42:11->42:20] -Completable: Cpath Value[otherFunc] -Package opens Pervasives.JsxModules.place holder -Resolved opens 1 pervasives -ContextPath Value[otherFunc] -Path otherFunc -argAtCursor: unlabelled<2> -extracted params: -[. string, int, float] -{ - "signatures": [{ - "label": "(. string, int, float) => unit", - "parameters": [{"label": [1, 9], "documentation": {"kind": "markdown", "value": "```rescript\nstring\n```"}}, {"label": [11, 14], "documentation": {"kind": "markdown", "value": "```rescript\nstring\n```"}}, {"label": [16, 21], "documentation": {"kind": "markdown", "value": "```rescript\nstring\n```"}}] - }], - "activeSignature": 0, - "activeParameter": 2 -} - -Signature help src/SignatureHelpUncurried.res 45:33 -posCursor:[45:29] posNoWhite:[45:28] Found expr:[45:11->45:34] -Pexp_apply ...[45:11->45:29] (~age45:31->45:34=...[45:31->45:34]) -posCursor:[45:29] posNoWhite:[45:28] Found expr:[45:11->45:29] -Pexp_ident Completion.Lib.foo:[45:11->45:29] -Completable: Cpath Value[Completion, Lib, foo] -Package opens Pervasives.JsxModules.place holder -Resolved opens 1 pervasives -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```"}}] - }], - "activeSignature": 0, - "activeParameter": 0 -} - -Signature help src/SignatureHelpUncurried.res 52:24 -posCursor:[52:23] posNoWhite:[52:22] Found expr:[52:11->52:24] -Pexp_apply ...[52:11->52:23] (...[58:0->52:24]) -posCursor:[52:23] posNoWhite:[52:22] Found expr:[52:11->52:23] -Pexp_ident iAmSoSpecial:[52:11->52:23] -Completable: Cpath Value[iAmSoSpecial] -Package opens Pervasives.JsxModules.place holder -Resolved opens 1 pervasives -ContextPath Value[iAmSoSpecial] -Path iAmSoSpecial -argAtCursor: unlabelled<0> -extracted params: -[. string] -{ - "signatures": [{ - "label": "(. string) => unit", - "parameters": [{"label": [1, 9], "documentation": {"kind": "markdown", "value": "```rescript\nstring\n```"}}] - }], - "activeSignature": 0, - "activeParameter": 0 -} - -Signature help src/SignatureHelpUncurried.res 55:31 -posCursor:[55:29] posNoWhite:[55:28] Found expr:[55:11->55:31] -Pexp_apply ...[55:18->55:20] (...[55:11->55:18], ...[55:20->55:31]) -posCursor:[55:29] posNoWhite:[55:28] Found expr:[55:20->55:31] -Pexp_apply ...[55:20->55:29] (...[55:30->55:31]) -posCursor:[55:29] posNoWhite:[55:28] Found expr:[55:20->55:29] -Pexp_ident otherFunc:[55:20->55:29] -Completable: Cpath Value[otherFunc] -Package opens Pervasives.JsxModules.place holder -Resolved opens 1 pervasives -ContextPath Value[otherFunc] -Path otherFunc -argAtCursor: unlabelled<1> -extracted params: -[. string, int, float] -{ - "signatures": [{ - "label": "(. string, int, float) => unit", - "parameters": [{"label": [1, 9], "documentation": {"kind": "markdown", "value": "```rescript\nstring\n```"}}, {"label": [11, 14], "documentation": {"kind": "markdown", "value": "```rescript\nstring\n```"}}, {"label": [16, 21], "documentation": {"kind": "markdown", "value": "```rescript\nstring\n```"}}] - }], - "activeSignature": 0, - "activeParameter": 1 -} - -Signature help src/SignatureHelpUncurried.res 64:17 -posCursor:[64:13] posNoWhite:[64:12] Found expr:[64:11->64:19] -Pexp_apply ...[64:11->64:13] (...[64:14->64:16]) -posCursor:[64:13] posNoWhite:[64:12] Found expr:[64:11->64:13] -Pexp_ident fn:[64:11->64:13] -Completable: Cpath Value[fn] -Package opens Pervasives.JsxModules.place holder -Resolved opens 1 pervasives -ContextPath Value[fn] -Path fn -argAtCursor: unlabelled<1> -extracted params: -[. int, string, int] -{ - "signatures": [{ - "label": "(. int, string, int) => unit", - "parameters": [{"label": [1, 6], "documentation": {"kind": "markdown", "value": "```rescript\nint\n```"}}, {"label": [8, 14], "documentation": {"kind": "markdown", "value": "```rescript\nint\n```"}}, {"label": [16, 19], "documentation": {"kind": "markdown", "value": "```rescript\nint\n```"}}] - }], - "activeSignature": 0, - "activeParameter": 1 -} - -Signature help src/SignatureHelpUncurried.res 67:17 -posCursor:[67:13] posNoWhite:[67:12] Found expr:[67:11->67:25] -Pexp_apply ...[67:11->67:13] (...[67:14->67:16], ...[67:20->67:24]) -posCursor:[67:13] posNoWhite:[67:12] Found expr:[67:11->67:13] -Pexp_ident fn:[67:11->67:13] -Completable: Cpath Value[fn] -Package opens Pervasives.JsxModules.place holder -Resolved opens 1 pervasives -ContextPath Value[fn] -Path fn -argAtCursor: unlabelled<1> -extracted params: -[. int, string, int] -{ - "signatures": [{ - "label": "(. int, string, int) => unit", - "parameters": [{"label": [1, 6], "documentation": {"kind": "markdown", "value": "```rescript\nint\n```"}}, {"label": [8, 14], "documentation": {"kind": "markdown", "value": "```rescript\nint\n```"}}, {"label": [16, 19], "documentation": {"kind": "markdown", "value": "```rescript\nint\n```"}}] - }], - "activeSignature": 0, - "activeParameter": 1 -} - -Signature help src/SignatureHelpUncurried.res 70:26 -posCursor:[70:13] posNoWhite:[70:12] Found expr:[70:11->70:28] -Pexp_apply ...[70:11->70:13] (...[70:14->70:16], ...[70:18->70:25]) -posCursor:[70:13] posNoWhite:[70:12] Found expr:[70:11->70:13] -Pexp_ident fn:[70:11->70:13] -Completable: Cpath Value[fn] -Package opens Pervasives.JsxModules.place holder -Resolved opens 1 pervasives -ContextPath Value[fn] -Path fn -argAtCursor: unlabelled<2> -extracted params: -[. int, string, int] -{ - "signatures": [{ - "label": "(. int, string, int) => unit", - "parameters": [{"label": [1, 6], "documentation": {"kind": "markdown", "value": "```rescript\nint\n```"}}, {"label": [8, 14], "documentation": {"kind": "markdown", "value": "```rescript\nint\n```"}}, {"label": [16, 19], "documentation": {"kind": "markdown", "value": "```rescript\nint\n```"}}] - }], - "activeSignature": 0, - "activeParameter": 2 -} - -Signature help src/SignatureHelpUncurried.res 73:29 -posCursor:[73:28] posNoWhite:[73:27] Found expr:[73:11->73:33] -Pexp_apply ...[73:11->73:13] (...[73:16->73:30]) -posCursor:[73:28] posNoWhite:[73:27] Found expr:[73:16->73:30] -Pexp_apply ...[73:16->73:28] (...[73:29->73:30]) -posCursor:[73:28] posNoWhite:[73:27] Found expr:[73:16->73:28] -Pexp_ident iAmSoSpecial:[73:16->73:28] -Completable: Cpath Value[iAmSoSpecial] -Package opens Pervasives.JsxModules.place holder -Resolved opens 1 pervasives -ContextPath Value[iAmSoSpecial] -Path iAmSoSpecial -argAtCursor: unlabelled<0> -extracted params: -[. string] -{ - "signatures": [{ - "label": "(. string) => unit", - "parameters": [{"label": [1, 9], "documentation": {"kind": "markdown", "value": "```rescript\nstring\n```"}}] - }], - "activeSignature": 0, - "activeParameter": 0 -} - -Signature help src/SignatureHelpUncurried.res 76:40 -posCursor:[76:39] posNoWhite:[76:38] Found expr:[76:11->76:47] -Pexp_apply ...[76:11->76:13] (...[76:16->76:44]) -posCursor:[76:39] posNoWhite:[76:38] Found expr:[76:16->76:44] -Pexp_apply ...[76:16->76:28] (...[76:31->76:41]) -posCursor:[76:39] posNoWhite:[76:38] Found expr:[76:31->76:41] -Pexp_apply ...[76:31->76:39] (...[76:40->76:41]) -posCursor:[76:39] posNoWhite:[76:38] Found expr:[76:31->76:39] -Pexp_ident someFunc:[76:31->76:39] -Completable: Cpath Value[someFunc] -Package opens Pervasives.JsxModules.place holder -Resolved opens 1 pervasives -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": [1, 8], "documentation": {"kind": "markdown", "value": "```rescript\nint\n```"}}, {"label": [12, 26], "documentation": {"kind": "markdown", "value": "```rescript\noption\n```"}}, {"label": [30, 54], "documentation": {"kind": "markdown", "value": "```rescript\n(. unit) => unit\n```"}}, {"label": [58, 76], "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%22SignatureHelpUncurried.res%22%2C2%2C0%5D)"}}, {"label": [80, 84], "documentation": {"kind": "markdown", "value": "```rescript\nint\n```"}}], - "documentation": {"kind": "markdown", "value": " Does stuff. "} - }], - "activeSignature": 0, - "activeParameter": 0 -} - From 99c0097e7d1c3518656bed4a0264be2c05b1e63b Mon Sep 17 00:00:00 2001 From: Gabriel Nordeborn Date: Thu, 17 Aug 2023 13:23:06 +0200 Subject: [PATCH 03/11] try changing printer uncurried config --- analysis/tests/src/expected/Auto.res.txt | 2 +- .../tests/src/expected/Completion.res.txt | 161 +++++++++--------- .../expected/CompletionExpressions.res.txt | 24 +-- .../expected/CompletionInferValues.res.txt | 44 ++--- .../tests/src/expected/CompletionJsx.res.txt | 54 +++--- .../src/expected/CompletionJsxProps.res.txt | 2 +- .../src/expected/CompletionPipeChain.res.txt | 4 +- .../expected/CompletionTypeAnnotation.res.txt | 2 +- analysis/tests/src/expected/Debug.res.txt | 4 +- .../tests/src/expected/Definition.res.txt | 4 +- analysis/tests/src/expected/Jsx2.resi.txt | 2 +- analysis/tests/src/expected/JsxV4.res.txt | 6 +- .../src/expected/RecordCompletion.res.txt | 8 +- .../vendor/res_syntax/res_outcome_printer.ml | 4 +- 14 files changed, 156 insertions(+), 165 deletions(-) diff --git a/analysis/tests/src/expected/Auto.res.txt b/analysis/tests/src/expected/Auto.res.txt index 79623569c..84bddf963 100644 --- a/analysis/tests/src/expected/Auto.res.txt +++ b/analysis/tests/src/expected/Auto.res.txt @@ -1,3 +1,3 @@ Hover src/Auto.res 2:13 -{"contents": {"kind": "markdown", "value": "```rescript\n(. Belt.List.t<'a>, (. 'a) => 'b) => Belt.List.t<'b>\n```\n\n---\n\n```\n \n```\n```rescript\ntype Belt.List.t<'a> = list<'a>\n```\nGo to: [Type definition](command:rescript-vscode.go_to_location?%5B%22belt_List.resi%22%2C35%2C0%5D)\n\n\n\n Returns a new list with `f` applied to each element of `someList`.\n\n ```res example\n list{1, 2}->Belt.List.map(x => x + 1) // list{3, 4}\n ```\n"}} +{"contents": {"kind": "markdown", "value": "```rescript\n(Belt.List.t<'a>, 'a => 'b) => Belt.List.t<'b>\n```\n\n---\n\n```\n \n```\n```rescript\ntype Belt.List.t<'a> = list<'a>\n```\nGo to: [Type definition](command:rescript-vscode.go_to_location?%5B%22belt_List.resi%22%2C35%2C0%5D)\n\n\n\n Returns a new list with `f` applied to each element of `someList`.\n\n ```res example\n list{1, 2}->Belt.List.map(x => x + 1) // list{3, 4}\n ```\n"}} diff --git a/analysis/tests/src/expected/Completion.res.txt b/analysis/tests/src/expected/Completion.res.txt index 0258455be..52c050808 100644 --- a/analysis/tests/src/expected/Completion.res.txt +++ b/analysis/tests/src/expected/Completion.res.txt @@ -10,67 +10,67 @@ Path MyList.m "label": "mapReverse", "kind": 12, "tags": [], - "detail": "(. t<'a>, (. 'a) => 'b) => t<'b>", + "detail": "(t<'a>, 'a => 'b) => t<'b>", "documentation": {"kind": "markdown", "value": "\n Equivalent to:\n\n ```res\n map(someList, f)->reverse\n ```\n\n ```res example\n list{3, 4, 5}->Belt.List.mapReverse(x => x * x) /* list{25, 16, 9} */\n ```\n"} }, { "label": "makeBy", "kind": 12, "tags": [], - "detail": "(. int, (. int) => 'a) => t<'a>", + "detail": "(int, int => 'a) => t<'a>", "documentation": {"kind": "markdown", "value": "\nReturn a list of length `numItems` with element `i` initialized with `f(i)`.\nReturns an empty list if `numItems` is negative.\n\n```res example\nBelt.List.makeBy(5, i => i) // list{0, 1, 2, 3, 4}\n\nBelt.List.makeBy(5, i => i * i) // list{0, 1, 4, 9, 16}\n```\n"} }, { "label": "make", "kind": 12, "tags": [], - "detail": "(. int, 'a) => t<'a>", + "detail": "(int, 'a) => t<'a>", "documentation": {"kind": "markdown", "value": "\n Returns a list of length `numItems` with each element filled with value `v`. Returns an empty list if `numItems` is negative.\n\n ```res example\n Belt.List.make(3, 1) // list{1, 1, 1}\n ```\n"} }, { "label": "mapReverse2U", "kind": 12, "tags": [], - "detail": "(. t<'a>, t<'b>, ('a, 'b) => 'c) => t<'c>", + "detail": "(t<'a>, t<'b>, ('a, 'b) => 'c) => t<'c>", "documentation": {"kind": "markdown", "value": " Uncurried version of [mapReverse2](#mapReverse2). "} }, { "label": "map", "kind": 12, "tags": [], - "detail": "(. t<'a>, (. 'a) => 'b) => t<'b>", + "detail": "(t<'a>, 'a => 'b) => t<'b>", "documentation": {"kind": "markdown", "value": "\n Returns a new list with `f` applied to each element of `someList`.\n\n ```res example\n list{1, 2}->Belt.List.map(x => x + 1) // list{3, 4}\n ```\n"} }, { "label": "mapWithIndexU", "kind": 12, "tags": [], - "detail": "(. t<'a>, (int, 'a) => 'b) => t<'b>", + "detail": "(t<'a>, (int, 'a) => 'b) => t<'b>", "documentation": {"kind": "markdown", "value": " Uncurried version of [mapWithIndex](#mapWithIndex). "} }, { "label": "mapU", "kind": 12, "tags": [], - "detail": "(. t<'a>, 'a => 'b) => t<'b>", + "detail": "(t<'a>, 'a => 'b) => t<'b>", "documentation": {"kind": "markdown", "value": " Uncurried version of [map](#map). "} }, { "label": "makeByU", "kind": 12, "tags": [], - "detail": "(. int, int => 'a) => t<'a>", + "detail": "(int, int => 'a) => t<'a>", "documentation": {"kind": "markdown", "value": " Uncurried version of [makeBy](#makeBy) "} }, { "label": "mapReverse2", "kind": 12, "tags": [], - "detail": "(. t<'a>, t<'b>, (. 'a, 'b) => 'c) => t<'c>", + "detail": "(t<'a>, t<'b>, ('a, 'b) => 'c) => t<'c>", "documentation": {"kind": "markdown", "value": "\n Equivalent to: `zipBy(xs, ys, f)->reverse`\n\n ```res example\n\n Belt.List.mapReverse2(list{1, 2, 3}, list{1, 2}, (a, b) => a + b) // list{4, 2}\n ```\n"} }, { "label": "mapWithIndex", "kind": 12, "tags": [], - "detail": "(. t<'a>, (. int, 'a) => 'b) => t<'b>", + "detail": "(t<'a>, (int, 'a) => 'b) => t<'b>", "documentation": {"kind": "markdown", "value": "\n Applies `f` to each element of `someList`.\n Function `f` takes two arguments: the index starting from 0 and the element from `someList`, in that order.\n\n ```res example\n list{1, 2, 3}->Belt.List.mapWithIndex((index, x) => index + x) // list{1, 3, 5}\n ```\n"} }, { "label": "mapReverseU", "kind": 12, "tags": [], - "detail": "(. t<'a>, 'a => 'b) => t<'b>", + "detail": "(t<'a>, 'a => 'b) => t<'b>", "documentation": {"kind": "markdown", "value": " Uncurried version of [mapReverse](#mapReverse). "} }] @@ -86,211 +86,211 @@ Path Array. "label": "fold_left", "kind": 12, "tags": [], - "detail": "(. (. 'a, 'b) => 'a, 'a, array<'b>) => 'a", + "detail": "(('a, 'b) => 'a, 'a, array<'b>) => 'a", "documentation": {"kind": "markdown", "value": " [Array.fold_left f x a] computes\n [f (... (f (f x a.(0)) a.(1)) ...) a.(n-1)],\n where [n] is the length of the array [a]. "} }, { "label": "concat", "kind": 12, "tags": [], - "detail": "(. list>) => array<'a>", + "detail": "list> => array<'a>", "documentation": {"kind": "markdown", "value": " Same as {!Array.append}, but concatenates a list of arrays. "} }, { "label": "mapi", "kind": 12, "tags": [], - "detail": "(. (. int, 'a) => 'b, array<'a>) => array<'b>", + "detail": "((int, 'a) => 'b, array<'a>) => array<'b>", "documentation": {"kind": "markdown", "value": " Same as {!Array.map}, but the\n function is applied to the index of the element as first argument,\n and the element itself as second argument. "} }, { "label": "exists", "kind": 12, "tags": [], - "detail": "(. (. 'a) => bool, array<'a>) => bool", + "detail": "('a => bool, array<'a>) => bool", "documentation": {"kind": "markdown", "value": " [Array.exists p [|a1; ...; an|]] checks if at least one element of\n the array satisfies the predicate [p]. That is, it returns\n [(p a1) || (p a2) || ... || (p an)].\n @since 4.03.0 "} }, { "label": "for_all", "kind": 12, "tags": [], - "detail": "(. (. 'a) => bool, array<'a>) => bool", + "detail": "('a => bool, array<'a>) => bool", "documentation": {"kind": "markdown", "value": " [Array.for_all p [|a1; ...; an|]] checks if all elements of the array\n satisfy the predicate [p]. That is, it returns\n [(p a1) && (p a2) && ... && (p an)].\n @since 4.03.0 "} }, { "label": "copy", "kind": 12, "tags": [], - "detail": "(. array<'a>) => array<'a>", + "detail": "array<'a> => array<'a>", "documentation": {"kind": "markdown", "value": " [Array.copy a] returns a copy of [a], that is, a fresh array\n containing the same elements as [a]. "} }, { "label": "iter2", "kind": 12, "tags": [], - "detail": "(. (. 'a, 'b) => unit, array<'a>, array<'b>) => unit", + "detail": "(('a, 'b) => unit, array<'a>, array<'b>) => unit", "documentation": {"kind": "markdown", "value": " [Array.iter2 f a b] applies function [f] to all the elements of [a]\n and [b].\n Raise [Invalid_argument] if the arrays are not the same size.\n @since 4.03.0 "} }, { "label": "to_list", "kind": 12, "tags": [], - "detail": "(. array<'a>) => list<'a>", + "detail": "array<'a> => list<'a>", "documentation": {"kind": "markdown", "value": " [Array.to_list a] returns the list of all the elements of [a]. "} }, { "label": "stable_sort", "kind": 12, "tags": [], - "detail": "(. (. 'a, 'a) => int, array<'a>) => unit", + "detail": "(('a, 'a) => int, array<'a>) => unit", "documentation": {"kind": "markdown", "value": " Same as {!Array.sort}, but the sorting algorithm is stable (i.e.\n elements that compare equal are kept in their original order) and\n not guaranteed to run in constant heap space.\n\n The current implementation uses Merge Sort. It uses [n/2]\n words of heap space, where [n] is the length of the array.\n It is usually faster than the current implementation of {!Array.sort}.\n"} }, { "label": "iteri", "kind": 12, "tags": [], - "detail": "(. (. int, 'a) => unit, array<'a>) => unit", + "detail": "((int, 'a) => unit, array<'a>) => unit", "documentation": {"kind": "markdown", "value": " Same as {!Array.iter}, but the\n function is applied with the index of the element as first argument,\n and the element itself as second argument. "} }, { "label": "memq", "kind": 12, "tags": [], - "detail": "(. 'a, array<'a>) => bool", + "detail": "('a, array<'a>) => bool", "documentation": {"kind": "markdown", "value": " Same as {!Array.mem}, but uses physical equality instead of structural\n equality to compare array elements.\n @since 4.03.0 "} }, { "label": "map2", "kind": 12, "tags": [], - "detail": "(. (. 'a, 'b) => 'c, array<'a>, array<'b>) => array<'c>", + "detail": "(('a, 'b) => 'c, array<'a>, array<'b>) => array<'c>", "documentation": {"kind": "markdown", "value": " [Array.map2 f a b] applies function [f] to all the elements of [a]\n and [b], and builds an array with the results returned by [f]:\n [[| f a.(0) b.(0); ...; f a.(Array.length a - 1) b.(Array.length b - 1)|]].\n Raise [Invalid_argument] if the arrays are not the same size.\n @since 4.03.0 "} }, { "label": "set", "kind": 12, "tags": [], - "detail": "(. array<'a>, int, 'a) => unit", + "detail": "(array<'a>, int, 'a) => unit", "documentation": {"kind": "markdown", "value": " [Array.set a n x] modifies array [a] in place, replacing\n element number [n] with [x].\n You can also write [a.(n) <- x] instead of [Array.set a n x].\n\n Raise [Invalid_argument \"index out of bounds\"]\n if [n] is outside the range 0 to [Array.length a - 1]. "} }, { "label": "make", "kind": 12, "tags": [], - "detail": "(. int, 'a) => array<'a>", + "detail": "(int, 'a) => array<'a>", "documentation": {"kind": "markdown", "value": " [Array.make n x] returns a fresh array of length [n],\n initialized with [x].\n All the elements of this new array are initially\n physically equal to [x] (in the sense of the [==] predicate).\n Consequently, if [x] is mutable, it is shared among all elements\n of the array, and modifying [x] through one of the array entries\n will modify all other entries at the same time.\n\n Raise [Invalid_argument] if [n < 0] or [n > Sys.max_array_length].\n If the value of [x] is a floating-point number, then the maximum\n size is only [Sys.max_array_length / 2]."} }, { "label": "make_float", "kind": 12, "tags": [1], - "detail": "(. int) => array", + "detail": "int => array", "documentation": {"kind": "markdown", "value": "Deprecated: Use Array.create_float instead.\n\n @deprecated [Array.make_float] is an alias for {!Array.create_float}. "} }, { "label": "fold_right", "kind": 12, "tags": [], - "detail": "(. (. 'b, 'a) => 'a, array<'b>, 'a) => 'a", + "detail": "(('b, 'a) => 'a, array<'b>, 'a) => 'a", "documentation": {"kind": "markdown", "value": " [Array.fold_right f a x] computes\n [f a.(0) (f a.(1) ( ... (f a.(n-1) x) ...))],\n where [n] is the length of the array [a]. "} }, { "label": "sort", "kind": 12, "tags": [], - "detail": "(. (. 'a, 'a) => int, array<'a>) => unit", + "detail": "(('a, 'a) => int, array<'a>) => unit", "documentation": {"kind": "markdown", "value": " Sort an array in increasing order according to a comparison\n function. The comparison function must return 0 if its arguments\n compare as equal, a positive integer if the first is greater,\n and a negative integer if the first is smaller (see below for a\n complete specification). For example, {!Pervasives.compare} is\n a suitable comparison function, provided there are no floating-point\n NaN values in the data. After calling [Array.sort], the\n array is sorted in place in increasing order.\n [Array.sort] is guaranteed to run in constant heap space\n and (at most) logarithmic stack space.\n\n The current implementation uses Heap Sort. It runs in constant\n stack space.\n\n Specification of the comparison function:\n Let [a] be the array and [cmp] the comparison function. The following\n must be true for all x, y, z in a :\n- [cmp x y] > 0 if and only if [cmp y x] < 0\n- if [cmp x y] >= 0 and [cmp y z] >= 0 then [cmp x z] >= 0\n\n When [Array.sort] returns, [a] contains the same elements as before,\n reordered in such a way that for all i and j valid indices of [a] :\n- [cmp a.(i) a.(j)] >= 0 if and only if i >= j\n"} }, { "label": "length", "kind": 12, "tags": [], - "detail": "(. array<'a>) => int", + "detail": "array<'a> => int", "documentation": {"kind": "markdown", "value": " Return the length (number of elements) of the given array. "} }, { "label": "sub", "kind": 12, "tags": [], - "detail": "(. array<'a>, int, int) => array<'a>", + "detail": "(array<'a>, int, int) => array<'a>", "documentation": {"kind": "markdown", "value": " [Array.sub a start len] returns a fresh array of length [len],\n containing the elements number [start] to [start + len - 1]\n of array [a].\n\n Raise [Invalid_argument \"Array.sub\"] if [start] and [len] do not\n designate a valid subarray of [a]; that is, if\n [start < 0], or [len < 0], or [start + len > Array.length a]. "} }, { "label": "of_list", "kind": 12, "tags": [], - "detail": "(. list<'a>) => array<'a>", + "detail": "list<'a> => array<'a>", "documentation": {"kind": "markdown", "value": " [Array.of_list l] returns a fresh array containing the elements\n of [l]. "} }, { "label": "iter", "kind": 12, "tags": [], - "detail": "(. (. 'a) => unit, array<'a>) => unit", + "detail": "('a => unit, array<'a>) => unit", "documentation": {"kind": "markdown", "value": " [Array.iter f a] applies function [f] in turn to all\n the elements of [a]. It is equivalent to\n [f a.(0); f a.(1); ...; f a.(Array.length a - 1); ()]. "} }, { "label": "map", "kind": 12, "tags": [], - "detail": "(. (. 'a) => 'b, array<'a>) => array<'b>", + "detail": "('a => 'b, array<'a>) => array<'b>", "documentation": {"kind": "markdown", "value": " [Array.map f a] applies function [f] to all the elements of [a],\n and builds an array with the results returned by [f]:\n [[| f a.(0); f a.(1); ...; f a.(Array.length a - 1) |]]. "} }, { "label": "unsafe_get", "kind": 12, "tags": [], - "detail": "(. array<'a>, int) => 'a", + "detail": "(array<'a>, int) => 'a", "documentation": null }, { "label": "make_matrix", "kind": 12, "tags": [], - "detail": "(. int, int, 'a) => array>", + "detail": "(int, int, 'a) => array>", "documentation": {"kind": "markdown", "value": " [Array.make_matrix dimx dimy e] returns a two-dimensional array\n (an array of arrays) with first dimension [dimx] and\n second dimension [dimy]. All the elements of this new matrix\n are initially physically equal to [e].\n The element ([x,y]) of a matrix [m] is accessed\n with the notation [m.(x).(y)].\n\n Raise [Invalid_argument] if [dimx] or [dimy] is negative or\n greater than {!Sys.max_array_length}.\n If the value of [e] is a floating-point number, then the maximum\n size is only [Sys.max_array_length / 2]. "} }, { "label": "mem", "kind": 12, "tags": [], - "detail": "(. 'a, array<'a>) => bool", + "detail": "('a, array<'a>) => bool", "documentation": {"kind": "markdown", "value": " [mem a l] is true if and only if [a] is equal\n to an element of [l].\n @since 4.03.0 "} }, { "label": "get", "kind": 12, "tags": [], - "detail": "(. array<'a>, int) => 'a", + "detail": "(array<'a>, int) => 'a", "documentation": {"kind": "markdown", "value": " [Array.get a n] returns the element number [n] of array [a].\n The first element has number 0.\n The last element has number [Array.length a - 1].\n You can also write [a.(n)] instead of [Array.get a n].\n\n Raise [Invalid_argument \"index out of bounds\"]\n if [n] is outside the range 0 to [(Array.length a - 1)]. "} }, { "label": "append", "kind": 12, "tags": [], - "detail": "(. array<'a>, array<'a>) => array<'a>", + "detail": "(array<'a>, array<'a>) => array<'a>", "documentation": {"kind": "markdown", "value": " [Array.append v1 v2] returns a fresh array containing the\n concatenation of the arrays [v1] and [v2]. "} }, { "label": "unsafe_set", "kind": 12, "tags": [], - "detail": "(. array<'a>, int, 'a) => unit", + "detail": "(array<'a>, int, 'a) => unit", "documentation": null }, { "label": "create_matrix", "kind": 12, "tags": [1], - "detail": "(. int, int, 'a) => array>", + "detail": "(int, int, 'a) => array>", "documentation": {"kind": "markdown", "value": "Deprecated: Use Array.make_matrix instead.\n\n @deprecated [Array.create_matrix] is an alias for {!Array.make_matrix}. "} }, { "label": "create_float", "kind": 12, "tags": [], - "detail": "(. int) => array", + "detail": "int => array", "documentation": {"kind": "markdown", "value": " [Array.create_float n] returns a fresh float array of length [n],\n with uninitialized data.\n @since 4.03 "} }, { "label": "create", "kind": 12, "tags": [1], - "detail": "(. int, 'a) => array<'a>", + "detail": "(int, 'a) => array<'a>", "documentation": {"kind": "markdown", "value": "Deprecated: Use Array.make instead.\n\n @deprecated [Array.create] is an alias for {!Array.make}. "} }, { "label": "init", "kind": 12, "tags": [], - "detail": "(. int, (. int) => 'a) => array<'a>", + "detail": "(int, int => 'a) => array<'a>", "documentation": {"kind": "markdown", "value": " [Array.init n f] returns a fresh array of length [n],\n with element number [i] initialized to the result of [f i].\n In other terms, [Array.init n f] tabulates the results of [f]\n applied to the integers [0] to [n-1].\n\n Raise [Invalid_argument] if [n < 0] or [n > Sys.max_array_length].\n If the return type of [f] is [float], then the maximum\n size is only [Sys.max_array_length / 2]."} }, { "label": "fast_sort", "kind": 12, "tags": [], - "detail": "(. (. 'a, 'a) => int, array<'a>) => unit", + "detail": "(('a, 'a) => int, array<'a>) => unit", "documentation": {"kind": "markdown", "value": " Same as {!Array.sort} or {!Array.stable_sort}, whichever is faster\n on typical input.\n"} }, { "label": "fill", "kind": 12, "tags": [], - "detail": "(. array<'a>, int, int, 'a) => unit", + "detail": "(array<'a>, int, int, 'a) => unit", "documentation": {"kind": "markdown", "value": " [Array.fill a ofs len x] modifies the array [a] in place,\n storing [x] in elements number [ofs] to [ofs + len - 1].\n\n Raise [Invalid_argument \"Array.fill\"] if [ofs] and [len] do not\n designate a valid subarray of [a]. "} }, { "label": "blit", "kind": 12, "tags": [], - "detail": "(. array<'a>, int, array<'a>, int, int) => unit", + "detail": "(array<'a>, int, array<'a>, int, int) => unit", "documentation": {"kind": "markdown", "value": " [Array.blit v1 o1 v2 o2 len] copies [len] elements\n from array [v1], starting at element number [o1], to array [v2],\n starting at element number [o2]. It works correctly even if\n [v1] and [v2] are the same array, and the source and\n destination chunks overlap.\n\n Raise [Invalid_argument \"Array.blit\"] if [o1] and [len] do not\n designate a valid subarray of [v1], or if [o2] and [len] do not\n designate a valid subarray of [v2]. "} }, { "label": "Floatarray", @@ -312,49 +312,49 @@ Path Array.m "label": "mapi", "kind": 12, "tags": [], - "detail": "(. (. int, 'a) => 'b, array<'a>) => array<'b>", + "detail": "((int, 'a) => 'b, array<'a>) => array<'b>", "documentation": {"kind": "markdown", "value": " Same as {!Array.map}, but the\n function is applied to the index of the element as first argument,\n and the element itself as second argument. "} }, { "label": "memq", "kind": 12, "tags": [], - "detail": "(. 'a, array<'a>) => bool", + "detail": "('a, array<'a>) => bool", "documentation": {"kind": "markdown", "value": " Same as {!Array.mem}, but uses physical equality instead of structural\n equality to compare array elements.\n @since 4.03.0 "} }, { "label": "map2", "kind": 12, "tags": [], - "detail": "(. (. 'a, 'b) => 'c, array<'a>, array<'b>) => array<'c>", + "detail": "(('a, 'b) => 'c, array<'a>, array<'b>) => array<'c>", "documentation": {"kind": "markdown", "value": " [Array.map2 f a b] applies function [f] to all the elements of [a]\n and [b], and builds an array with the results returned by [f]:\n [[| f a.(0) b.(0); ...; f a.(Array.length a - 1) b.(Array.length b - 1)|]].\n Raise [Invalid_argument] if the arrays are not the same size.\n @since 4.03.0 "} }, { "label": "make", "kind": 12, "tags": [], - "detail": "(. int, 'a) => array<'a>", + "detail": "(int, 'a) => array<'a>", "documentation": {"kind": "markdown", "value": " [Array.make n x] returns a fresh array of length [n],\n initialized with [x].\n All the elements of this new array are initially\n physically equal to [x] (in the sense of the [==] predicate).\n Consequently, if [x] is mutable, it is shared among all elements\n of the array, and modifying [x] through one of the array entries\n will modify all other entries at the same time.\n\n Raise [Invalid_argument] if [n < 0] or [n > Sys.max_array_length].\n If the value of [x] is a floating-point number, then the maximum\n size is only [Sys.max_array_length / 2]."} }, { "label": "make_float", "kind": 12, "tags": [1], - "detail": "(. int) => array", + "detail": "int => array", "documentation": {"kind": "markdown", "value": "Deprecated: Use Array.create_float instead.\n\n @deprecated [Array.make_float] is an alias for {!Array.create_float}. "} }, { "label": "map", "kind": 12, "tags": [], - "detail": "(. (. 'a) => 'b, array<'a>) => array<'b>", + "detail": "('a => 'b, array<'a>) => array<'b>", "documentation": {"kind": "markdown", "value": " [Array.map f a] applies function [f] to all the elements of [a],\n and builds an array with the results returned by [f]:\n [[| f a.(0); f a.(1); ...; f a.(Array.length a - 1) |]]. "} }, { "label": "make_matrix", "kind": 12, "tags": [], - "detail": "(. int, int, 'a) => array>", + "detail": "(int, int, 'a) => array>", "documentation": {"kind": "markdown", "value": " [Array.make_matrix dimx dimy e] returns a two-dimensional array\n (an array of arrays) with first dimension [dimx] and\n second dimension [dimy]. All the elements of this new matrix\n are initially physically equal to [e].\n The element ([x,y]) of a matrix [m] is accessed\n with the notation [m.(x).(y)].\n\n Raise [Invalid_argument] if [dimx] or [dimy] is negative or\n greater than {!Sys.max_array_length}.\n If the value of [e] is a floating-point number, then the maximum\n size is only [Sys.max_array_length / 2]. "} }, { "label": "mem", "kind": 12, "tags": [], - "detail": "(. 'a, array<'a>) => bool", + "detail": "('a, array<'a>) => bool", "documentation": {"kind": "markdown", "value": " [mem a l] is true if and only if [a] is equal\n to an element of [l].\n @since 4.03.0 "} }] @@ -410,13 +410,13 @@ Path Js.Array2.m "label": "Js.Array2.mapi", "kind": 12, "tags": [], - "detail": "(. t<'a>, (. 'a, int) => 'b) => t<'b>", + "detail": "(t<'a>, ('a, int) => 'b) => t<'b>", "documentation": {"kind": "markdown", "value": "\nApplies the function (the second argument) to each item in the array, returning\na new array. The function acceps two arguments: an item from the array and its\nindex number. The result array does not have to have elements of the same type\nas the input array. See\n[`Array.map`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/map)\non MDN.\n\n```res example\n// multiply each item in array by its position\nlet product = (item, index) => item * index\nJs.Array2.mapi([10, 11, 12], product) == [0, 11, 24]\n```\n"} }, { "label": "Js.Array2.map", "kind": 12, "tags": [], - "detail": "(. t<'a>, (. 'a) => 'b) => t<'b>", + "detail": "(t<'a>, 'a => 'b) => t<'b>", "documentation": {"kind": "markdown", "value": "\nApplies the function (the second argument) to each item in the array, returning\na new array. The result array does not have to have elements of the same type\nas the input array. See\n[`Array.map`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/map)\non MDN.\n\n```res example\nJs.Array2.map([12, 4, 8], x => x * x) == [144, 16, 64]\nJs.Array2.map([\"animal\", \"vegetable\", \"mineral\"], Js.String.length) == [6, 9, 7]\n```\n"} }] @@ -433,7 +433,7 @@ Path Js.String2.toU "label": "Js.String2.toUpperCase", "kind": 12, "tags": [], - "detail": "(. t) => t", + "detail": "t => t", "documentation": {"kind": "markdown", "value": "\n`toUpperCase(str)` converts `str` to upper case using the locale-insensitive\ncase mappings in the Unicode Character Database. Notice that the conversion can\nexpand the number of letters in the result; for example the German ß\ncapitalizes to two Ses in a row.\n\nSee [`String.toUpperCase`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String/toUpperCase)\non MDN.\n\n```res example\nJs.String2.toUpperCase(\"abc\") == \"ABC\"\nJs.String2.toUpperCase(`Straße`) == `STRASSE`\nJs.String2.toUpperCase(`πς`) == `ΠΣ`\n```\n"} }] @@ -451,13 +451,13 @@ Path Belt.Option.e "label": "Belt.Option.eqU", "kind": 12, "tags": [], - "detail": "(. option<'a>, option<'b>, ('a, 'b) => bool) => bool", + "detail": "(option<'a>, option<'b>, ('a, 'b) => bool) => bool", "documentation": {"kind": "markdown", "value": "\n Uncurried version of `eq`\n"} }, { "label": "Belt.Option.eq", "kind": 12, "tags": [], - "detail": "(. option<'a>, option<'b>, (. 'a, 'b) => bool) => bool", + "detail": "(option<'a>, option<'b>, ('a, 'b) => bool) => bool", "documentation": {"kind": "markdown", "value": "\n Evaluates two optional values for equality with respect to a predicate\n function. If both `optValue1` and `optValue2` are `None`, returns `true`.\n If one of the arguments is `Some(value)` and the other is `None`, returns\n `false`.\n\n If arguments are `Some(value1)` and `Some(value2)`, returns the result of\n `predicate(value1, value2)`; the predicate function must return a bool.\n\n ```res example\n let clockEqual = (a, b) => mod(a, 12) == mod(b, 12)\n\n open Belt.Option\n\n eq(Some(3), Some(15), clockEqual) /* true */\n\n eq(Some(3), None, clockEqual) /* false */\n\n eq(None, Some(3), clockEqual) /* false */\n\n eq(None, None, clockEqual) /* true */\n ```\n"} }] @@ -502,7 +502,7 @@ Path Js.Dict.u "label": "unsafeGet", "kind": 12, "tags": [], - "detail": "(. t<'a>, key) => 'a", + "detail": "(t<'a>, key) => 'a", "documentation": {"kind": "markdown", "value": "\n`Js.Dict.unsafeGet(key)` returns the value if the key exists, otherwise an `undefined` value is returned. Use this only when you are sure the key exists (i.e. when having used the `keys()` function to check that the key is valid).\n\n```res example\nJs.Dict.unsafeGet(ages, \"Fred\") == 49\nJs.Dict.unsafeGet(ages, \"Paul\") // returns undefined\n```\n"} }, { "label": "unsafeDeleteKey", @@ -1383,7 +1383,7 @@ Resolved opens 3 Completion.res Completion.res pervasives ContextPath Value[ff](~c) ContextPath Value[ff] Path ff -Found type for function (. +Found type for function ( ~opt1: int=?, ~a: int, ~b: int, @@ -1428,7 +1428,7 @@ ContextPath Value[ff](~c)(Nolabel) ContextPath Value[ff](~c) ContextPath Value[ff] Path ff -Found type for function (. ~a: int, ~b: int, ~opt2: int=?, unit) => int +Found type for function (~a: int, ~b: int, ~opt2: int=?, unit) => int [{ "label": "a", "kind": 4, @@ -1459,7 +1459,7 @@ Resolved opens 3 Completion.res Completion.res pervasives ContextPath Value[ff](~c, Nolabel) ContextPath Value[ff] Path ff -Found type for function (. ~a: int, ~b: int, ~opt2: int=?, unit) => int +Found type for function (~a: int, ~b: int, ~opt2: int=?, unit) => int [{ "label": "a", "kind": 4, @@ -1490,7 +1490,7 @@ Resolved opens 3 Completion.res Completion.res pervasives ContextPath Value[ff](~c, Nolabel, Nolabel) ContextPath Value[ff] Path ff -Found type for function (. ~a: int, ~b: int) => int +Found type for function (~a: int, ~b: int) => int [{ "label": "a", "kind": 4, @@ -1515,7 +1515,7 @@ Resolved opens 3 Completion.res Completion.res pervasives ContextPath Value[ff](~c, Nolabel, ~b) ContextPath Value[ff] Path ff -Found type for function (. ~a: int, ~opt2: int=?, unit) => int +Found type for function (~a: int, ~opt2: int=?, unit) => int [{ "label": "a", "kind": 4, @@ -1540,14 +1540,7 @@ Resolved opens 3 Completion.res Completion.res pervasives ContextPath Value[ff](~opt2) ContextPath Value[ff] Path ff -Found type for function (. - ~opt1: int=?, - ~a: int, - ~b: int, - unit, - unit, - ~c: int, -) => int +Found type for function (~opt1: int=?, ~a: int, ~b: int, unit, unit, ~c: int) => int [{ "label": "opt1", "kind": 4, @@ -1621,7 +1614,7 @@ Resolved opens 3 Completion.res Completion.res pervasives ContextPath Value[withCallback](~b) ContextPath Value[withCallback] Path withCallback -Found type for function (. ~a: int) => int +Found type for function (~a: int) => int [{ "label": "a", "kind": 4, @@ -1910,13 +1903,13 @@ Path Js.Array2.ma "label": "Array2.mapi", "kind": 12, "tags": [], - "detail": "(. t<'a>, (. 'a, int) => 'b) => t<'b>", + "detail": "(t<'a>, ('a, int) => 'b) => t<'b>", "documentation": {"kind": "markdown", "value": "\nApplies the function (the second argument) to each item in the array, returning\na new array. The function acceps two arguments: an item from the array and its\nindex number. The result array does not have to have elements of the same type\nas the input array. See\n[`Array.map`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/map)\non MDN.\n\n```res example\n// multiply each item in array by its position\nlet product = (item, index) => item * index\nJs.Array2.mapi([10, 11, 12], product) == [0, 11, 24]\n```\n"} }, { "label": "Array2.map", "kind": 12, "tags": [], - "detail": "(. t<'a>, (. 'a) => 'b) => t<'b>", + "detail": "(t<'a>, 'a => 'b) => t<'b>", "documentation": {"kind": "markdown", "value": "\nApplies the function (the second argument) to each item in the array, returning\na new array. The result array does not have to have elements of the same type\nas the input array. See\n[`Array.map`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/map)\non MDN.\n\n```res example\nJs.Array2.map([12, 4, 8], x => x * x) == [144, 16, 64]\nJs.Array2.map([\"animal\", \"vegetable\", \"mineral\"], Js.String.length) == [6, 9, 7]\n```\n"} }] @@ -2067,13 +2060,13 @@ Path Belt.Int.t "label": "Belt.Int.toString", "kind": 12, "tags": [], - "detail": "(. int) => string", + "detail": "int => string", "documentation": {"kind": "markdown", "value": "\n Converts a given `int` to a `string`. Uses the JavaScript `String` constructor under the hood.\n\n ```res example\n Js.log(Belt.Int.toString(1) === \"1\") /* true */\n ```\n"} }, { "label": "Belt.Int.toFloat", "kind": 12, "tags": [], - "detail": "(. int) => float", + "detail": "int => float", "documentation": {"kind": "markdown", "value": "\n Converts a given `int` to a `float`.\n\n ```res example\n Js.log(Belt.Int.toFloat(1) === 1.0) /* true */\n ```\n"} }] @@ -2091,13 +2084,13 @@ Path Belt.Float.t "label": "Belt.Float.toInt", "kind": 12, "tags": [], - "detail": "(. float) => int", + "detail": "float => int", "documentation": {"kind": "markdown", "value": "\nConverts a given `float` to an `int`.\n\n```res example\nJs.log(Belt.Float.toInt(1.0) === 1) /* true */\n```\n"} }, { "label": "Belt.Float.toString", "kind": 12, "tags": [], - "detail": "(. float) => string", + "detail": "float => string", "documentation": {"kind": "markdown", "value": "\n Converts a given `float` to a `string`. Uses the JavaScript `String` constructor under the hood.\n\n ```res example\n Js.log(Belt.Float.toString(1.0) === \"1.0\") /* true */\n ```\n"} }] @@ -2116,13 +2109,13 @@ Path Belt.Result.g "label": "Belt.Result.getExn", "kind": 12, "tags": [], - "detail": "(. t<'a, 'b>) => 'a", + "detail": "t<'a, 'b> => 'a", "documentation": {"kind": "markdown", "value": "\n `getExn(res)`: when `res` is `Ok(n)`, returns `n` when `res` is `Error(m)`, raise an exception\n\n ```res example\n Belt.Result.getExn(Belt.Result.Ok(42)) == 42\n\n Belt.Result.getExn(Belt.Result.Error(\"Invalid data\")) /* raises exception */\n ```\n"} }, { "label": "Belt.Result.getWithDefault", "kind": 12, "tags": [], - "detail": "(. t<'a, 'b>, 'a) => 'a", + "detail": "(t<'a, 'b>, 'a) => 'a", "documentation": {"kind": "markdown", "value": "\n `getWithDefault(res, defaultValue)`: If `res` is `Ok(n)`, returns `n`,\n otherwise `default`\n\n ```res example\n Belt.Result.getWithDefault(Ok(42), 0) == 42\n\n Belt.Result.getWithDefault(Error(\"Invalid Data\"), 0) == 0\n ```\n"} }] @@ -2200,7 +2193,7 @@ Path Belt.Int.toS "label": "Belt.Int.toString", "kind": 12, "tags": [], - "detail": "(. int) => string", + "detail": "int => string", "documentation": {"kind": "markdown", "value": "\n Converts a given `int` to a `string`. Uses the JavaScript `String` constructor under the hood.\n\n ```res example\n Js.log(Belt.Int.toString(1) === \"1\") /* true */\n ```\n"} }] @@ -2216,7 +2209,7 @@ Path withUncurried "label": "v => {}", "kind": 12, "tags": [], - "detail": "(. int) => unit", + "detail": "int => unit", "documentation": null, "sortText": "A", "insertText": "${1:v} => {$0}", diff --git a/analysis/tests/src/expected/CompletionExpressions.res.txt b/analysis/tests/src/expected/CompletionExpressions.res.txt index 3c316261a..2be6098fd 100644 --- a/analysis/tests/src/expected/CompletionExpressions.res.txt +++ b/analysis/tests/src/expected/CompletionExpressions.res.txt @@ -780,7 +780,7 @@ Path fnTakingCallback "label": "() => {}", "kind": 12, "tags": [], - "detail": "(. unit) => unit", + "detail": "unit => unit", "documentation": null, "sortText": "A", "insertText": "() => {$0}", @@ -811,7 +811,7 @@ Path fnTakingCallback "label": "v => {}", "kind": 12, "tags": [], - "detail": "(. bool) => unit", + "detail": "bool => unit", "documentation": null, "sortText": "A", "insertText": "${1:v} => {$0}", @@ -831,7 +831,7 @@ Path fnTakingCallback "label": "event => {}", "kind": 12, "tags": [], - "detail": "(. ReactEvent.Mouse.t) => unit", + "detail": "ReactEvent.Mouse.t => unit", "documentation": null, "sortText": "A", "insertText": "${1:event} => {$0}", @@ -851,7 +851,7 @@ Path fnTakingCallback "label": "(~on, ~off=?, variant) => {}", "kind": 12, "tags": [], - "detail": "(. ~on: bool, ~off: bool=?, variant) => int", + "detail": "(~on: bool, ~off: bool=?, variant) => int", "documentation": null, "sortText": "A", "insertText": "(~on, ~off=?, ${1:variant}) => {$0}", @@ -871,7 +871,7 @@ Path fnTakingCallback "label": "(v1, v2, v3) => {}", "kind": 12, "tags": [], - "detail": "(. bool, option, bool) => unit", + "detail": "(bool, option, bool) => unit", "documentation": null, "sortText": "A", "insertText": "(${1:v1}, ${2:v2}, ${3:v3}) => {$0}", @@ -891,7 +891,7 @@ Path fnTakingCallback "label": "(~on=?, ~off=?, ()) => {}", "kind": 12, "tags": [], - "detail": "(. ~on: bool=?, ~off: bool=?, unit) => int", + "detail": "(~on: bool=?, ~off: bool=?, unit) => int", "documentation": null, "sortText": "A", "insertText": "(~on=?, ~off=?, ()) => {$0}", @@ -967,7 +967,7 @@ Path takesCb "label": "someTyp => {}", "kind": 12, "tags": [], - "detail": "(. someTyp) => 'a", + "detail": "someTyp => 'a", "documentation": null, "sortText": "A", "insertText": "${1:someTyp} => {$0}", @@ -987,7 +987,7 @@ Path takesCb2 "label": "environment => {}", "kind": 12, "tags": [], - "detail": "(. Environment.t) => 'a", + "detail": "Environment.t => 'a", "documentation": null, "sortText": "A", "insertText": "${1:environment} => {$0}", @@ -1007,7 +1007,7 @@ Path takesCb3 "label": "apiCallResult => {}", "kind": 12, "tags": [], - "detail": "(. apiCallResult) => 'a", + "detail": "apiCallResult => 'a", "documentation": null, "sortText": "A", "insertText": "${1:apiCallResult} => {$0}", @@ -1027,7 +1027,7 @@ Path takesCb4 "label": "apiCallResult => {}", "kind": 12, "tags": [], - "detail": "(. option) => 'a", + "detail": "option => 'a", "documentation": null, "sortText": "A", "insertText": "${1:apiCallResult} => {$0}", @@ -1047,7 +1047,7 @@ Path takesCb5 "label": "apiCallResults => {}", "kind": 12, "tags": [], - "detail": "(. array>) => 'a", + "detail": "array> => 'a", "documentation": null, "sortText": "A", "insertText": "${1:apiCallResults} => {$0}", @@ -1067,7 +1067,7 @@ Path commitLocalUpdate "label": "recordSourceSelectorProxy => {}", "kind": 12, "tags": [], - "detail": "(. RecordSourceSelectorProxy.t) => unit", + "detail": "RecordSourceSelectorProxy.t => unit", "documentation": null, "sortText": "A", "insertText": "${1:recordSourceSelectorProxy} => {$0}", diff --git a/analysis/tests/src/expected/CompletionInferValues.res.txt b/analysis/tests/src/expected/CompletionInferValues.res.txt index 8b00b52ad..b1cdbd422 100644 --- a/analysis/tests/src/expected/CompletionInferValues.res.txt +++ b/analysis/tests/src/expected/CompletionInferValues.res.txt @@ -15,13 +15,13 @@ Path Belt.Int.f "label": "Belt.Int.fromString", "kind": 12, "tags": [], - "detail": "(. string) => option", + "detail": "string => option", "documentation": {"kind": "markdown", "value": "\n Converts a given `string` to an `int`. Returns `Some(int)` when the input is a number, `None` otherwise.\n\n ```res example\n Js.log(Belt.Int.fromString(\"1\") === Some(1)) /* true */\n ```\n"} }, { "label": "Belt.Int.fromFloat", "kind": 12, "tags": [], - "detail": "(. float) => int", + "detail": "float => int", "documentation": {"kind": "markdown", "value": "\n Converts a given `float` to an `int`.\n\n ```res example\n Js.log(Belt.Int.fromFloat(1.0) === 1) /* true */\n ```\n"} }] @@ -258,13 +258,13 @@ Path Belt.Int.t "label": "Belt.Int.toString", "kind": 12, "tags": [], - "detail": "(. int) => string", + "detail": "int => string", "documentation": {"kind": "markdown", "value": "\n Converts a given `int` to a `string`. Uses the JavaScript `String` constructor under the hood.\n\n ```res example\n Js.log(Belt.Int.toString(1) === \"1\") /* true */\n ```\n"} }, { "label": "Belt.Int.toFloat", "kind": 12, "tags": [], - "detail": "(. int) => float", + "detail": "int => float", "documentation": {"kind": "markdown", "value": "\n Converts a given `int` to a `float`.\n\n ```res example\n Js.log(Belt.Int.toFloat(1) === 1.0) /* true */\n ```\n"} }] @@ -291,25 +291,25 @@ Path Js.String2.spl "label": "Js.String2.splitAtMost", "kind": 12, "tags": [], - "detail": "(. t, t, ~limit: int) => array", + "detail": "(t, t, ~limit: int) => array", "documentation": {"kind": "markdown", "value": "\n `splitAtMost delimiter ~limit: n str` splits the given `str` at every occurrence of `delimiter` and returns an array of the first `n` resulting substrings. If `n` is negative or greater than the number of substrings, the array will contain all the substrings.\n\n```\nsplitAtMost \"ant/bee/cat/dog/elk\" \"/\" ~limit: 3 = [|\"ant\"; \"bee\"; \"cat\"|];;\nsplitAtMost \"ant/bee/cat/dog/elk\" \"/\" ~limit: 0 = [| |];;\nsplitAtMost \"ant/bee/cat/dog/elk\" \"/\" ~limit: 9 = [|\"ant\"; \"bee\"; \"cat\"; \"dog\"; \"elk\"|];;\n```\n"} }, { "label": "Js.String2.splitByRe", "kind": 12, "tags": [], - "detail": "(. t, Js_re.t) => array>", + "detail": "(t, Js_re.t) => array>", "documentation": {"kind": "markdown", "value": "\n`splitByRe(str, regex)` splits the given `str` at every occurrence of `regex`\nand returns an array of the resulting substrings.\n\nSee [`String.split`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String/split)\non MDN.\n\n```res example\nJs.String2.splitByRe(\"art; bed , cog ;dad\", %re(\"/\\s*[,;]\\s*TODO/\")) == [\n Some(\"art\"),\n Some(\"bed\"),\n Some(\"cog\"),\n Some(\"dad\"),\n ]\n```\n"} }, { "label": "Js.String2.split", "kind": 12, "tags": [], - "detail": "(. t, t) => array", + "detail": "(t, t) => array", "documentation": {"kind": "markdown", "value": "\n`split(str, delimiter)` splits the given `str` at every occurrence of\n`delimiter` and returns an array of the resulting substrings.\n\nSee [`String.split`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String/split)\non MDN.\n\n```res example\nJs.String2.split(\"2018-01-02\", \"-\") == [\"2018\", \"01\", \"02\"]\nJs.String2.split(\"a,b,,c\", \",\") == [\"a\", \"b\", \"\", \"c\"]\nJs.String2.split(\"good::bad as great::awful\", \"::\") == [\"good\", \"bad as great\", \"awful\"]\nJs.String2.split(\"has-no-delimiter\", \";\") == [\"has-no-delimiter\"]\n```\n"} }, { "label": "Js.String2.splitByReAtMost", "kind": 12, "tags": [], - "detail": "(. t, Js_re.t, ~limit: int) => array>", + "detail": "(t, Js_re.t, ~limit: int) => array>", "documentation": {"kind": "markdown", "value": "\n`splitByReAtMost(str, regex, ~limit:n)` splits the given `str` at every\noccurrence of `regex` and returns an array of the first `n` resulting\nsubstrings. If `n` is negative or greater than the number of substrings, the\narray will contain all the substrings.\n\nSee [`String.split`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String/split)\non MDN.\n\n```res example\nJs.String2.splitByReAtMost(\"one: two: three: four\", %re(\"/\\s*:\\s*TODO/\"), ~limit=3) == [\n Some(\"one\"),\n Some(\"two\"),\n Some(\"three\"),\n ]\n\nJs.String2.splitByReAtMost(\"one: two: three: four\", %re(\"/\\s*:\\s*TODO/\"), ~limit=0) == []\n\nJs.String2.splitByReAtMost(\"one: two: three: four\", %re(\"/\\s*:\\s*TODO/\"), ~limit=8) == [\n Some(\"one\"),\n Some(\"two\"),\n Some(\"three\"),\n Some(\"four\"),\n ]\n```\n"} }] @@ -336,13 +336,13 @@ Path Js.Array2.ma "label": "Js.Array2.mapi", "kind": 12, "tags": [], - "detail": "(. t<'a>, (. 'a, int) => 'b) => t<'b>", + "detail": "(t<'a>, ('a, int) => 'b) => t<'b>", "documentation": {"kind": "markdown", "value": "\nApplies the function (the second argument) to each item in the array, returning\na new array. The function acceps two arguments: an item from the array and its\nindex number. The result array does not have to have elements of the same type\nas the input array. See\n[`Array.map`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/map)\non MDN.\n\n```res example\n// multiply each item in array by its position\nlet product = (item, index) => item * index\nJs.Array2.mapi([10, 11, 12], product) == [0, 11, 24]\n```\n"} }, { "label": "Js.Array2.map", "kind": 12, "tags": [], - "detail": "(. t<'a>, (. 'a) => 'b) => t<'b>", + "detail": "(t<'a>, 'a => 'b) => t<'b>", "documentation": {"kind": "markdown", "value": "\nApplies the function (the second argument) to each item in the array, returning\na new array. The result array does not have to have elements of the same type\nas the input array. See\n[`Array.map`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/map)\non MDN.\n\n```res example\nJs.Array2.map([12, 4, 8], x => x * x) == [144, 16, 64]\nJs.Array2.map([\"animal\", \"vegetable\", \"mineral\"], Js.String.length) == [6, 9, 7]\n```\n"} }] @@ -468,13 +468,13 @@ Path Js.String2.slic "label": "Js.String2.sliceToEnd", "kind": 12, "tags": [], - "detail": "(. t, ~from: int) => t", + "detail": "(t, ~from: int) => t", "documentation": {"kind": "markdown", "value": "\n`sliceToEnd(str, from:n)` returns the substring of `str` starting at character\n`n` to the end of the string.\n- If `n` is negative, then it is evaluated as `length(str - n)`.\n- If `n` is greater than the length of `str`, then sliceToEnd returns the empty string.\n\nSee [`String.slice`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String/slice) on MDN.\n\n```res example\nJs.String2.sliceToEnd(\"abcdefg\", ~from=4) == \"efg\"\nJs.String2.sliceToEnd(\"abcdefg\", ~from=-2) == \"fg\"\nJs.String2.sliceToEnd(\"abcdefg\", ~from=7) == \"\"\n```\n"} }, { "label": "Js.String2.slice", "kind": 12, "tags": [], - "detail": "(. t, ~from: int, ~to_: int) => t", + "detail": "(t, ~from: int, ~to_: int) => t", "documentation": {"kind": "markdown", "value": "\n`slice(str, from:n1, to_:n2)` returns the substring of `str` starting at\ncharacter `n1` up to but not including `n2`.\n- If either `n1` or `n2` is negative, then it is evaluated as `length(str - n1)` or `length(str - n2)`.\n- If `n2` is greater than the length of `str`, then it is treated as `length(str)`.\n- If `n1` is greater than `n2`, slice returns the empty string.\n\nSee [`String.slice`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String/slice) on MDN.\n\n```res example\nJs.String2.slice(\"abcdefg\", ~from=2, ~to_=5) == \"cde\"\nJs.String2.slice(\"abcdefg\", ~from=2, ~to_=9) == \"cdefg\"\nJs.String2.slice(\"abcdefg\", ~from=-4, ~to_=-2) == \"de\"\nJs.String2.slice(\"abcdefg\", ~from=5, ~to_=1) == \"\"\n```\n"} }] @@ -497,7 +497,7 @@ Path Belt.Int.toS "label": "Belt.Int.toString", "kind": 12, "tags": [], - "detail": "(. int) => string", + "detail": "int => string", "documentation": {"kind": "markdown", "value": "\n Converts a given `int` to a `string`. Uses the JavaScript `String` constructor under the hood.\n\n ```res example\n Js.log(Belt.Int.toString(1) === \"1\") /* true */\n ```\n"} }] @@ -523,7 +523,7 @@ Path Belt.Int.toS "label": "Belt.Int.toString", "kind": 12, "tags": [], - "detail": "(. int) => string", + "detail": "int => string", "documentation": {"kind": "markdown", "value": "\n Converts a given `int` to a `string`. Uses the JavaScript `String` constructor under the hood.\n\n ```res example\n Js.log(Belt.Int.toString(1) === \"1\") /* true */\n ```\n"} }] @@ -550,7 +550,7 @@ Path Belt.Int.toS "label": "Belt.Int.toString", "kind": 12, "tags": [], - "detail": "(. int) => string", + "detail": "int => string", "documentation": {"kind": "markdown", "value": "\n Converts a given `int` to a `string`. Uses the JavaScript `String` constructor under the hood.\n\n ```res example\n Js.log(Belt.Int.toString(1) === \"1\") /* true */\n ```\n"} }] @@ -573,13 +573,13 @@ Path Js.String2.slic "label": "Js.String2.sliceToEnd", "kind": 12, "tags": [], - "detail": "(. t, ~from: int) => t", + "detail": "(t, ~from: int) => t", "documentation": {"kind": "markdown", "value": "\n`sliceToEnd(str, from:n)` returns the substring of `str` starting at character\n`n` to the end of the string.\n- If `n` is negative, then it is evaluated as `length(str - n)`.\n- If `n` is greater than the length of `str`, then sliceToEnd returns the empty string.\n\nSee [`String.slice`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String/slice) on MDN.\n\n```res example\nJs.String2.sliceToEnd(\"abcdefg\", ~from=4) == \"efg\"\nJs.String2.sliceToEnd(\"abcdefg\", ~from=-2) == \"fg\"\nJs.String2.sliceToEnd(\"abcdefg\", ~from=7) == \"\"\n```\n"} }, { "label": "Js.String2.slice", "kind": 12, "tags": [], - "detail": "(. t, ~from: int, ~to_: int) => t", + "detail": "(t, ~from: int, ~to_: int) => t", "documentation": {"kind": "markdown", "value": "\n`slice(str, from:n1, to_:n2)` returns the substring of `str` starting at\ncharacter `n1` up to but not including `n2`.\n- If either `n1` or `n2` is negative, then it is evaluated as `length(str - n1)` or `length(str - n2)`.\n- If `n2` is greater than the length of `str`, then it is treated as `length(str)`.\n- If `n1` is greater than `n2`, slice returns the empty string.\n\nSee [`String.slice`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String/slice) on MDN.\n\n```res example\nJs.String2.slice(\"abcdefg\", ~from=2, ~to_=5) == \"cde\"\nJs.String2.slice(\"abcdefg\", ~from=2, ~to_=9) == \"cdefg\"\nJs.String2.slice(\"abcdefg\", ~from=-4, ~to_=-2) == \"de\"\nJs.String2.slice(\"abcdefg\", ~from=5, ~to_=1) == \"\"\n```\n"} }] @@ -602,13 +602,13 @@ Path Js.String2.slic "label": "Js.String2.sliceToEnd", "kind": 12, "tags": [], - "detail": "(. t, ~from: int) => t", + "detail": "(t, ~from: int) => t", "documentation": {"kind": "markdown", "value": "\n`sliceToEnd(str, from:n)` returns the substring of `str` starting at character\n`n` to the end of the string.\n- If `n` is negative, then it is evaluated as `length(str - n)`.\n- If `n` is greater than the length of `str`, then sliceToEnd returns the empty string.\n\nSee [`String.slice`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String/slice) on MDN.\n\n```res example\nJs.String2.sliceToEnd(\"abcdefg\", ~from=4) == \"efg\"\nJs.String2.sliceToEnd(\"abcdefg\", ~from=-2) == \"fg\"\nJs.String2.sliceToEnd(\"abcdefg\", ~from=7) == \"\"\n```\n"} }, { "label": "Js.String2.slice", "kind": 12, "tags": [], - "detail": "(. t, ~from: int, ~to_: int) => t", + "detail": "(t, ~from: int, ~to_: int) => t", "documentation": {"kind": "markdown", "value": "\n`slice(str, from:n1, to_:n2)` returns the substring of `str` starting at\ncharacter `n1` up to but not including `n2`.\n- If either `n1` or `n2` is negative, then it is evaluated as `length(str - n1)` or `length(str - n2)`.\n- If `n2` is greater than the length of `str`, then it is treated as `length(str)`.\n- If `n1` is greater than `n2`, slice returns the empty string.\n\nSee [`String.slice`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String/slice) on MDN.\n\n```res example\nJs.String2.slice(\"abcdefg\", ~from=2, ~to_=5) == \"cde\"\nJs.String2.slice(\"abcdefg\", ~from=2, ~to_=9) == \"cdefg\"\nJs.String2.slice(\"abcdefg\", ~from=-4, ~to_=-2) == \"de\"\nJs.String2.slice(\"abcdefg\", ~from=5, ~to_=1) == \"\"\n```\n"} }] @@ -631,13 +631,13 @@ Path Js.String2.slic "label": "Js.String2.sliceToEnd", "kind": 12, "tags": [], - "detail": "(. t, ~from: int) => t", + "detail": "(t, ~from: int) => t", "documentation": {"kind": "markdown", "value": "\n`sliceToEnd(str, from:n)` returns the substring of `str` starting at character\n`n` to the end of the string.\n- If `n` is negative, then it is evaluated as `length(str - n)`.\n- If `n` is greater than the length of `str`, then sliceToEnd returns the empty string.\n\nSee [`String.slice`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String/slice) on MDN.\n\n```res example\nJs.String2.sliceToEnd(\"abcdefg\", ~from=4) == \"efg\"\nJs.String2.sliceToEnd(\"abcdefg\", ~from=-2) == \"fg\"\nJs.String2.sliceToEnd(\"abcdefg\", ~from=7) == \"\"\n```\n"} }, { "label": "Js.String2.slice", "kind": 12, "tags": [], - "detail": "(. t, ~from: int, ~to_: int) => t", + "detail": "(t, ~from: int, ~to_: int) => t", "documentation": {"kind": "markdown", "value": "\n`slice(str, from:n1, to_:n2)` returns the substring of `str` starting at\ncharacter `n1` up to but not including `n2`.\n- If either `n1` or `n2` is negative, then it is evaluated as `length(str - n1)` or `length(str - n2)`.\n- If `n2` is greater than the length of `str`, then it is treated as `length(str)`.\n- If `n1` is greater than `n2`, slice returns the empty string.\n\nSee [`String.slice`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String/slice) on MDN.\n\n```res example\nJs.String2.slice(\"abcdefg\", ~from=2, ~to_=5) == \"cde\"\nJs.String2.slice(\"abcdefg\", ~from=2, ~to_=9) == \"cdefg\"\nJs.String2.slice(\"abcdefg\", ~from=-4, ~to_=-2) == \"de\"\nJs.String2.slice(\"abcdefg\", ~from=5, ~to_=1) == \"\"\n```\n"} }] @@ -687,7 +687,7 @@ Path Belt.Int.toSt "label": "Belt.Int.toString", "kind": 12, "tags": [], - "detail": "(. int) => string", + "detail": "int => string", "documentation": {"kind": "markdown", "value": "\n Converts a given `int` to a `string`. Uses the JavaScript `String` constructor under the hood.\n\n ```res example\n Js.log(Belt.Int.toString(1) === \"1\") /* true */\n ```\n"} }] diff --git a/analysis/tests/src/expected/CompletionJsx.res.txt b/analysis/tests/src/expected/CompletionJsx.res.txt index 92c01db2e..61a0b6a3a 100644 --- a/analysis/tests/src/expected/CompletionJsx.res.txt +++ b/analysis/tests/src/expected/CompletionJsx.res.txt @@ -12,13 +12,13 @@ Path Js.String2.st "label": "Js.String2.startsWith", "kind": 12, "tags": [], - "detail": "(. t, t) => bool", + "detail": "(t, t) => bool", "documentation": {"kind": "markdown", "value": "\nES2015: `startsWith(str, substr)` returns `true` if the `str` starts with\n`substr`, `false` otherwise.\n\nSee [`String.startsWith`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String/startsWith)\non MDN.\n\n```res example\nJs.String2.startsWith(\"BuckleScript\", \"Buckle\") == true\nJs.String2.startsWith(\"BuckleScript\", \"\") == true\nJs.String2.startsWith(\"JavaScript\", \"Buckle\") == false\n```\n"} }, { "label": "Js.String2.startsWithFrom", "kind": 12, "tags": [], - "detail": "(. t, t, int) => bool", + "detail": "(t, t, int) => bool", "documentation": {"kind": "markdown", "value": "\nES2015: `startsWithFrom(str, substr, n)` returns `true` if the `str` starts\nwith `substr` starting at position `n`, false otherwise. If `n` is negative,\nthe search starts at the beginning of `str`.\n\nSee [`String.startsWith`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String/startsWith)\non MDN.\n\n```res example\nJs.String2.startsWithFrom(\"BuckleScript\", \"kle\", 3) == true\nJs.String2.startsWithFrom(\"BuckleScript\", \"\", 3) == true\nJs.String2.startsWithFrom(\"JavaScript\", \"Buckle\", 2) == false\n```\n"} }] @@ -52,13 +52,13 @@ Path Js.String2.st "label": "Js.String2.startsWith", "kind": 12, "tags": [], - "detail": "(. t, t) => bool", + "detail": "(t, t) => bool", "documentation": {"kind": "markdown", "value": "\nES2015: `startsWith(str, substr)` returns `true` if the `str` starts with\n`substr`, `false` otherwise.\n\nSee [`String.startsWith`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String/startsWith)\non MDN.\n\n```res example\nJs.String2.startsWith(\"BuckleScript\", \"Buckle\") == true\nJs.String2.startsWith(\"BuckleScript\", \"\") == true\nJs.String2.startsWith(\"JavaScript\", \"Buckle\") == false\n```\n"} }, { "label": "Js.String2.startsWithFrom", "kind": 12, "tags": [], - "detail": "(. t, t, int) => bool", + "detail": "(t, t, int) => bool", "documentation": {"kind": "markdown", "value": "\nES2015: `startsWithFrom(str, substr, n)` returns `true` if the `str` starts\nwith `substr` starting at position `n`, false otherwise. If `n` is negative,\nthe search starts at the beginning of `str`.\n\nSee [`String.startsWith`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String/startsWith)\non MDN.\n\n```res example\nJs.String2.startsWithFrom(\"BuckleScript\", \"kle\", 3) == true\nJs.String2.startsWithFrom(\"BuckleScript\", \"\", 3) == true\nJs.String2.startsWithFrom(\"JavaScript\", \"Buckle\", 2) == false\n```\n"} }] @@ -102,13 +102,13 @@ Path Js.String2.st "label": "Js.String2.startsWith", "kind": 12, "tags": [], - "detail": "(. t, t) => bool", + "detail": "(t, t) => bool", "documentation": {"kind": "markdown", "value": "\nES2015: `startsWith(str, substr)` returns `true` if the `str` starts with\n`substr`, `false` otherwise.\n\nSee [`String.startsWith`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String/startsWith)\non MDN.\n\n```res example\nJs.String2.startsWith(\"BuckleScript\", \"Buckle\") == true\nJs.String2.startsWith(\"BuckleScript\", \"\") == true\nJs.String2.startsWith(\"JavaScript\", \"Buckle\") == false\n```\n"} }, { "label": "Js.String2.startsWithFrom", "kind": 12, "tags": [], - "detail": "(. t, t, int) => bool", + "detail": "(t, t, int) => bool", "documentation": {"kind": "markdown", "value": "\nES2015: `startsWithFrom(str, substr, n)` returns `true` if the `str` starts\nwith `substr` starting at position `n`, false otherwise. If `n` is negative,\nthe search starts at the beginning of `str`.\n\nSee [`String.startsWith`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String/startsWith)\non MDN.\n\n```res example\nJs.String2.startsWithFrom(\"BuckleScript\", \"kle\", 3) == true\nJs.String2.startsWithFrom(\"BuckleScript\", \"\", 3) == true\nJs.String2.startsWithFrom(\"JavaScript\", \"Buckle\", 2) == false\n```\n"} }] @@ -151,13 +151,13 @@ Path Js.String2.st "label": "Js.String2.startsWith", "kind": 12, "tags": [], - "detail": "(. t, t) => bool", + "detail": "(t, t) => bool", "documentation": {"kind": "markdown", "value": "\nES2015: `startsWith(str, substr)` returns `true` if the `str` starts with\n`substr`, `false` otherwise.\n\nSee [`String.startsWith`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String/startsWith)\non MDN.\n\n```res example\nJs.String2.startsWith(\"BuckleScript\", \"Buckle\") == true\nJs.String2.startsWith(\"BuckleScript\", \"\") == true\nJs.String2.startsWith(\"JavaScript\", \"Buckle\") == false\n```\n"} }, { "label": "Js.String2.startsWithFrom", "kind": 12, "tags": [], - "detail": "(. t, t, int) => bool", + "detail": "(t, t, int) => bool", "documentation": {"kind": "markdown", "value": "\nES2015: `startsWithFrom(str, substr, n)` returns `true` if the `str` starts\nwith `substr` starting at position `n`, false otherwise. If `n` is negative,\nthe search starts at the beginning of `str`.\n\nSee [`String.startsWith`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String/startsWith)\non MDN.\n\n```res example\nJs.String2.startsWithFrom(\"BuckleScript\", \"kle\", 3) == true\nJs.String2.startsWithFrom(\"BuckleScript\", \"\", 3) == true\nJs.String2.startsWithFrom(\"JavaScript\", \"Buckle\", 2) == false\n```\n"} }] @@ -202,13 +202,13 @@ Path Js.String2.st "label": "Js.String2.startsWith", "kind": 12, "tags": [], - "detail": "(. t, t) => bool", + "detail": "(t, t) => bool", "documentation": {"kind": "markdown", "value": "\nES2015: `startsWith(str, substr)` returns `true` if the `str` starts with\n`substr`, `false` otherwise.\n\nSee [`String.startsWith`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String/startsWith)\non MDN.\n\n```res example\nJs.String2.startsWith(\"BuckleScript\", \"Buckle\") == true\nJs.String2.startsWith(\"BuckleScript\", \"\") == true\nJs.String2.startsWith(\"JavaScript\", \"Buckle\") == false\n```\n"} }, { "label": "Js.String2.startsWithFrom", "kind": 12, "tags": [], - "detail": "(. t, t, int) => bool", + "detail": "(t, t, int) => bool", "documentation": {"kind": "markdown", "value": "\nES2015: `startsWithFrom(str, substr, n)` returns `true` if the `str` starts\nwith `substr` starting at position `n`, false otherwise. If `n` is negative,\nthe search starts at the beginning of `str`.\n\nSee [`String.startsWith`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String/startsWith)\non MDN.\n\n```res example\nJs.String2.startsWithFrom(\"BuckleScript\", \"kle\", 3) == true\nJs.String2.startsWithFrom(\"BuckleScript\", \"\", 3) == true\nJs.String2.startsWithFrom(\"JavaScript\", \"Buckle\", 2) == false\n```\n"} }] @@ -252,49 +252,49 @@ Path Belt.Int. "label": "Belt.Int.fromString", "kind": 12, "tags": [], - "detail": "(. string) => option", + "detail": "string => option", "documentation": {"kind": "markdown", "value": "\n Converts a given `string` to an `int`. Returns `Some(int)` when the input is a number, `None` otherwise.\n\n ```res example\n Js.log(Belt.Int.fromString(\"1\") === Some(1)) /* true */\n ```\n"} }, { "label": "Belt.Int.*", "kind": 12, "tags": [], - "detail": "(. int, int) => int", + "detail": "(int, int) => int", "documentation": {"kind": "markdown", "value": "\n Multiplication of two `int` values. Same as the multiplication from `Pervasives`.\n\n ```res example\n open Belt.Int\n Js.log(2 * 2 === 4) /* true */\n ```\n"} }, { "label": "Belt.Int./", "kind": 12, "tags": [], - "detail": "(. int, int) => int", + "detail": "(int, int) => int", "documentation": {"kind": "markdown", "value": "\n Division of two `int` values. Same as the division from `Pervasives`.\n\n ```res example\n open Belt.Int\n Js.log(4 / 2 === 2); /* true */\n ```\n"} }, { "label": "Belt.Int.toString", "kind": 12, "tags": [], - "detail": "(. int) => string", + "detail": "int => string", "documentation": {"kind": "markdown", "value": "\n Converts a given `int` to a `string`. Uses the JavaScript `String` constructor under the hood.\n\n ```res example\n Js.log(Belt.Int.toString(1) === \"1\") /* true */\n ```\n"} }, { "label": "Belt.Int.toFloat", "kind": 12, "tags": [], - "detail": "(. int) => float", + "detail": "int => float", "documentation": {"kind": "markdown", "value": "\n Converts a given `int` to a `float`.\n\n ```res example\n Js.log(Belt.Int.toFloat(1) === 1.0) /* true */\n ```\n"} }, { "label": "Belt.Int.fromFloat", "kind": 12, "tags": [], - "detail": "(. float) => int", + "detail": "float => int", "documentation": {"kind": "markdown", "value": "\n Converts a given `float` to an `int`.\n\n ```res example\n Js.log(Belt.Int.fromFloat(1.0) === 1) /* true */\n ```\n"} }, { "label": "Belt.Int.-", "kind": 12, "tags": [], - "detail": "(. int, int) => int", + "detail": "(int, int) => int", "documentation": {"kind": "markdown", "value": "\n Subtraction of two `int` values. Same as the subtraction from `Pervasives`.\n\n ```res example\n open Belt.Int\n Js.log(2 - 1 === 1) /* true */\n ```\n"} }, { "label": "Belt.Int.+", "kind": 12, "tags": [], - "detail": "(. int, int) => int", + "detail": "(int, int) => int", "documentation": {"kind": "markdown", "value": "\n Addition of two `int` values. Same as the addition from `Pervasives`.\n\n ```res example\n open Belt.Int\n Js.log(2 + 2 === 4) /* true */\n ```\n"} }] @@ -337,49 +337,49 @@ Path Belt.Int. "label": "Belt.Int.fromString", "kind": 12, "tags": [], - "detail": "(. string) => option", + "detail": "string => option", "documentation": {"kind": "markdown", "value": "\n Converts a given `string` to an `int`. Returns `Some(int)` when the input is a number, `None` otherwise.\n\n ```res example\n Js.log(Belt.Int.fromString(\"1\") === Some(1)) /* true */\n ```\n"} }, { "label": "Belt.Int.*", "kind": 12, "tags": [], - "detail": "(. int, int) => int", + "detail": "(int, int) => int", "documentation": {"kind": "markdown", "value": "\n Multiplication of two `int` values. Same as the multiplication from `Pervasives`.\n\n ```res example\n open Belt.Int\n Js.log(2 * 2 === 4) /* true */\n ```\n"} }, { "label": "Belt.Int./", "kind": 12, "tags": [], - "detail": "(. int, int) => int", + "detail": "(int, int) => int", "documentation": {"kind": "markdown", "value": "\n Division of two `int` values. Same as the division from `Pervasives`.\n\n ```res example\n open Belt.Int\n Js.log(4 / 2 === 2); /* true */\n ```\n"} }, { "label": "Belt.Int.toString", "kind": 12, "tags": [], - "detail": "(. int) => string", + "detail": "int => string", "documentation": {"kind": "markdown", "value": "\n Converts a given `int` to a `string`. Uses the JavaScript `String` constructor under the hood.\n\n ```res example\n Js.log(Belt.Int.toString(1) === \"1\") /* true */\n ```\n"} }, { "label": "Belt.Int.toFloat", "kind": 12, "tags": [], - "detail": "(. int) => float", + "detail": "int => float", "documentation": {"kind": "markdown", "value": "\n Converts a given `int` to a `float`.\n\n ```res example\n Js.log(Belt.Int.toFloat(1) === 1.0) /* true */\n ```\n"} }, { "label": "Belt.Int.fromFloat", "kind": 12, "tags": [], - "detail": "(. float) => int", + "detail": "float => int", "documentation": {"kind": "markdown", "value": "\n Converts a given `float` to an `int`.\n\n ```res example\n Js.log(Belt.Int.fromFloat(1.0) === 1) /* true */\n ```\n"} }, { "label": "Belt.Int.-", "kind": 12, "tags": [], - "detail": "(. int, int) => int", + "detail": "(int, int) => int", "documentation": {"kind": "markdown", "value": "\n Subtraction of two `int` values. Same as the subtraction from `Pervasives`.\n\n ```res example\n open Belt.Int\n Js.log(2 - 1 === 1) /* true */\n ```\n"} }, { "label": "Belt.Int.+", "kind": 12, "tags": [], - "detail": "(. int, int) => int", + "detail": "(int, int) => int", "documentation": {"kind": "markdown", "value": "\n Addition of two `int` values. Same as the addition from `Pervasives`.\n\n ```res example\n open Belt.Int\n Js.log(2 + 2 === 4) /* true */\n ```\n"} }] @@ -423,7 +423,7 @@ Path Js.Array2.a "label": "Js.Array2.append", "kind": 12, "tags": [1], - "detail": "(. t<'a>, 'a) => t<'a>", + "detail": "(t<'a>, 'a) => t<'a>", "documentation": {"kind": "markdown", "value": "Deprecated: `append` is not type-safe. Use `concat` instead.\n\n"} }] diff --git a/analysis/tests/src/expected/CompletionJsxProps.res.txt b/analysis/tests/src/expected/CompletionJsxProps.res.txt index 0b7d84df1..798028483 100644 --- a/analysis/tests/src/expected/CompletionJsxProps.res.txt +++ b/analysis/tests/src/expected/CompletionJsxProps.res.txt @@ -194,7 +194,7 @@ Path PervasivesU.JsxDOM.domProps "label": "event => {}", "kind": 12, "tags": [], - "detail": "(. JsxEventU.Mouse.t) => unit", + "detail": "JsxEventU.Mouse.t => unit", "documentation": null, "sortText": "A", "insertText": "{${1:event} => {$0}}", diff --git a/analysis/tests/src/expected/CompletionPipeChain.res.txt b/analysis/tests/src/expected/CompletionPipeChain.res.txt index 8ea60db9b..7717d5257 100644 --- a/analysis/tests/src/expected/CompletionPipeChain.res.txt +++ b/analysis/tests/src/expected/CompletionPipeChain.res.txt @@ -362,13 +362,13 @@ Path Belt.Int.t "label": "Belt.Int.toString", "kind": 12, "tags": [], - "detail": "(. int) => string", + "detail": "int => string", "documentation": {"kind": "markdown", "value": "\n Converts a given `int` to a `string`. Uses the JavaScript `String` constructor under the hood.\n\n ```res example\n Js.log(Belt.Int.toString(1) === \"1\") /* true */\n ```\n"} }, { "label": "Belt.Int.toFloat", "kind": 12, "tags": [], - "detail": "(. int) => float", + "detail": "int => float", "documentation": {"kind": "markdown", "value": "\n Converts a given `int` to a `float`.\n\n ```res example\n Js.log(Belt.Int.toFloat(1) === 1.0) /* true */\n ```\n"} }] diff --git a/analysis/tests/src/expected/CompletionTypeAnnotation.res.txt b/analysis/tests/src/expected/CompletionTypeAnnotation.res.txt index f6add19e0..cb0319ed2 100644 --- a/analysis/tests/src/expected/CompletionTypeAnnotation.res.txt +++ b/analysis/tests/src/expected/CompletionTypeAnnotation.res.txt @@ -145,7 +145,7 @@ Path someFunc "label": "(v1, v2) => {}", "kind": 12, "tags": [], - "detail": "(. int, string) => bool", + "detail": "(int, string) => bool", "documentation": null, "sortText": "A", "insertText": "(${1:v1}, ${2:v2}) => {$0}", diff --git a/analysis/tests/src/expected/Debug.res.txt b/analysis/tests/src/expected/Debug.res.txt index 2dc9ff6f2..ce23aabad 100644 --- a/analysis/tests/src/expected/Debug.res.txt +++ b/analysis/tests/src/expected/Debug.res.txt @@ -17,13 +17,13 @@ Path eqN "label": "eqNullable", "kind": 12, "tags": [], - "detail": "(. 'a, nullable<'a>) => bool", + "detail": "('a, nullable<'a>) => bool", "documentation": null }, { "label": "eqNull", "kind": 12, "tags": [], - "detail": "(. 'a, null<'a>) => bool", + "detail": "('a, null<'a>) => bool", "documentation": null }] diff --git a/analysis/tests/src/expected/Definition.res.txt b/analysis/tests/src/expected/Definition.res.txt index 834648700..d315b708c 100644 --- a/analysis/tests/src/expected/Definition.res.txt +++ b/analysis/tests/src/expected/Definition.res.txt @@ -5,10 +5,10 @@ Definition src/Definition.res 10:23 {"uri": "Definition.res", "range": {"start": {"line": 6, "character": 7}, "end": {"line": 6, "character": 13}}} Hover src/Definition.res 14:14 -{"contents": {"kind": "markdown", "value": "```rescript\n(. (. 'a) => 'b, list<'a>) => list<'b>\n```\n\n [List.map f [a1; ...; an]] applies function [f] to [a1, ..., an],\n and builds the list [[f a1; ...; f an]]\n with the results returned by [f]. Not tail-recursive. "}} +{"contents": {"kind": "markdown", "value": "```rescript\n('a => 'b, list<'a>) => list<'b>\n```\n\n [List.map f [a1; ...; an]] applies function [f] to [a1, ..., an],\n and builds the list [[f a1; ...; f an]]\n with the results returned by [f]. Not tail-recursive. "}} Hover src/Definition.res 18:14 -{"contents": {"kind": "markdown", "value": "```rescript\n(. Belt.List.t<'a>, (. 'a) => 'b) => Belt.List.t<'b>\n```\n\n---\n\n```\n \n```\n```rescript\ntype Belt.List.t<'a> = list<'a>\n```\nGo to: [Type definition](command:rescript-vscode.go_to_location?%5B%22belt_List.resi%22%2C35%2C0%5D)\n\n\n\n Returns a new list with `f` applied to each element of `someList`.\n\n ```res example\n list{1, 2}->Belt.List.map(x => x + 1) // list{3, 4}\n ```\n"}} +{"contents": {"kind": "markdown", "value": "```rescript\n(Belt.List.t<'a>, 'a => 'b) => Belt.List.t<'b>\n```\n\n---\n\n```\n \n```\n```rescript\ntype Belt.List.t<'a> = list<'a>\n```\nGo to: [Type definition](command:rescript-vscode.go_to_location?%5B%22belt_List.resi%22%2C35%2C0%5D)\n\n\n\n Returns a new list with `f` applied to each element of `someList`.\n\n ```res example\n list{1, 2}->Belt.List.map(x => x + 1) // list{3, 4}\n ```\n"}} Hover src/Definition.res 23:3 {"contents": {"kind": "markdown", "value": "```rescript\n(int, int) => int\n```"}} diff --git a/analysis/tests/src/expected/Jsx2.resi.txt b/analysis/tests/src/expected/Jsx2.resi.txt index e7f65b414..1dc85a0e9 100644 --- a/analysis/tests/src/expected/Jsx2.resi.txt +++ b/analysis/tests/src/expected/Jsx2.resi.txt @@ -1,7 +1,7 @@ Hover src/Jsx2.resi 1:4 getLocItem #1: heuristic for makeProps in interface files n1:componentLike n2:unit n3:string -{"contents": {"kind": "markdown", "value": "```rescript\n(.\n ~first: string,\n ~key: string=?,\n unit,\n) => {\"first\": string}\n```"}} +{"contents": {"kind": "markdown", "value": "```rescript\n(~first: string, ~key: string=?, unit) => {\"first\": string}\n```"}} Hover src/Jsx2.resi 4:4 {"contents": {"kind": "markdown", "value": "```rescript\nint\n```"}} diff --git a/analysis/tests/src/expected/JsxV4.res.txt b/analysis/tests/src/expected/JsxV4.res.txt index b265b8580..9c9bb9d37 100644 --- a/analysis/tests/src/expected/JsxV4.res.txt +++ b/analysis/tests/src/expected/JsxV4.res.txt @@ -22,14 +22,14 @@ Hover src/JsxV4.res 14:9 Create Interface src/JsxV4.res module M4: { @react.component - let make: (. ~first: string, ~fun: string=?, ~second: string=?) => React.element + let make: (~first: string, ~fun: string=?, ~second: string=?) => React.element } module MM: { @react.component - let make: (. unit) => React.element + let make: unit => React.element } module Other: { @react.component - let make: (. ~name: string) => React.element + let make: (~name: string) => React.element } diff --git a/analysis/tests/src/expected/RecordCompletion.res.txt b/analysis/tests/src/expected/RecordCompletion.res.txt index d98a0262f..f8ae52243 100644 --- a/analysis/tests/src/expected/RecordCompletion.res.txt +++ b/analysis/tests/src/expected/RecordCompletion.res.txt @@ -13,13 +13,13 @@ Path Js.Array2.m "label": "Js.Array2.mapi", "kind": 12, "tags": [], - "detail": "(. t<'a>, (. 'a, int) => 'b) => t<'b>", + "detail": "(t<'a>, ('a, int) => 'b) => t<'b>", "documentation": {"kind": "markdown", "value": "\nApplies the function (the second argument) to each item in the array, returning\na new array. The function acceps two arguments: an item from the array and its\nindex number. The result array does not have to have elements of the same type\nas the input array. See\n[`Array.map`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/map)\non MDN.\n\n```res example\n// multiply each item in array by its position\nlet product = (item, index) => item * index\nJs.Array2.mapi([10, 11, 12], product) == [0, 11, 24]\n```\n"} }, { "label": "Js.Array2.map", "kind": 12, "tags": [], - "detail": "(. t<'a>, (. 'a) => 'b) => t<'b>", + "detail": "(t<'a>, 'a => 'b) => t<'b>", "documentation": {"kind": "markdown", "value": "\nApplies the function (the second argument) to each item in the array, returning\na new array. The result array does not have to have elements of the same type\nas the input array. See\n[`Array.map`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/map)\non MDN.\n\n```res example\nJs.Array2.map([12, 4, 8], x => x * x) == [144, 16, 64]\nJs.Array2.map([\"animal\", \"vegetable\", \"mineral\"], Js.String.length) == [6, 9, 7]\n```\n"} }] @@ -39,13 +39,13 @@ Path Js.Array2.m "label": "Js.Array2.mapi", "kind": 12, "tags": [], - "detail": "(. t<'a>, (. 'a, int) => 'b) => t<'b>", + "detail": "(t<'a>, ('a, int) => 'b) => t<'b>", "documentation": {"kind": "markdown", "value": "\nApplies the function (the second argument) to each item in the array, returning\na new array. The function acceps two arguments: an item from the array and its\nindex number. The result array does not have to have elements of the same type\nas the input array. See\n[`Array.map`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/map)\non MDN.\n\n```res example\n// multiply each item in array by its position\nlet product = (item, index) => item * index\nJs.Array2.mapi([10, 11, 12], product) == [0, 11, 24]\n```\n"} }, { "label": "Js.Array2.map", "kind": 12, "tags": [], - "detail": "(. t<'a>, (. 'a) => 'b) => t<'b>", + "detail": "(t<'a>, 'a => 'b) => t<'b>", "documentation": {"kind": "markdown", "value": "\nApplies the function (the second argument) to each item in the array, returning\na new array. The result array does not have to have elements of the same type\nas the input array. See\n[`Array.map`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/map)\non MDN.\n\n```res example\nJs.Array2.map([12, 4, 8], x => x * x) == [144, 16, 64]\nJs.Array2.map([\"animal\", \"vegetable\", \"mineral\"], Js.String.length) == [6, 9, 7]\n```\n"} }] diff --git a/analysis/vendor/res_syntax/res_outcome_printer.ml b/analysis/vendor/res_syntax/res_outcome_printer.ml index da54dc626..7be5f6d1e 100644 --- a/analysis/vendor/res_syntax/res_outcome_printer.ml +++ b/analysis/vendor/res_syntax/res_outcome_printer.ml @@ -322,9 +322,7 @@ let rec printOutTypeDoc (outType : Outcometree.out_type) = ] and printOutArrowType ~uncurried typ = - let uncurried = - if !Config.uncurried <> Legacy then not uncurried else uncurried - in + let uncurried = Res_uncurried.getDotted ~uncurried !Config.uncurried in let typArgs, typ = collectArrowArgs typ [] in let args = Doc.join From 0d437dba7929be6d6048800951b0f054330d6c0f Mon Sep 17 00:00:00 2001 From: Gabriel Nordeborn Date: Thu, 17 Aug 2023 13:28:54 +0200 Subject: [PATCH 04/11] don't log constructor path for uncurried function --- analysis/src/CompletionFrontEnd.ml | 2 +- analysis/tests/src/expected/Completion.res.txt | 8 -------- .../expected/CompletionFunctionArguments.res.txt | 2 -- .../src/expected/CompletionInferValues.res.txt | 13 ------------- analysis/tests/src/expected/CompletionJsx.res.txt | 8 -------- .../tests/src/expected/CompletionPipeChain.res.txt | 2 -- analysis/tests/src/expected/Destructuring.res.txt | 2 -- 7 files changed, 1 insertion(+), 36 deletions(-) diff --git a/analysis/src/CompletionFrontEnd.ml b/analysis/src/CompletionFrontEnd.ml index 446c78c16..dd3d933eb 100644 --- a/analysis/src/CompletionFrontEnd.ml +++ b/analysis/src/CompletionFrontEnd.ml @@ -837,7 +837,7 @@ let completionWithParser1 ~currentFile ~debug ~offset ~path ~posCursor ~text = setResult (Cpath (CPId (lidPath, Value))) | Pexp_construct (lid, eOpt) -> let lidPath = flattenLidCheckDot lid in - if debug then + if debug && lid.txt <> Lident "Function$" then Printf.printf "Pexp_construct %s:%s %s\n" (lidPath |> String.concat "\n") (Loc.toString lid.loc) diff --git a/analysis/tests/src/expected/Completion.res.txt b/analysis/tests/src/expected/Completion.res.txt index 52c050808..63b6b2f37 100644 --- a/analysis/tests/src/expected/Completion.res.txt +++ b/analysis/tests/src/expected/Completion.res.txt @@ -765,7 +765,6 @@ Path Objects.Rec.recordVal Complete src/Completion.res 120:7 posCursor:[120:7] posNoWhite:[120:6] Found expr:[119:11->123:1] -Pexp_construct Function$:__ghost__[0:-1->0:-1] [119:11->123:1] posCursor:[120:7] posNoWhite:[120:6] Found expr:[119:11->123:1] posCursor:[120:7] posNoWhite:[120:6] Found expr:[120:5->122:5] posCursor:[120:7] posNoWhite:[120:6] Found expr:[120:5->120:7] @@ -1287,7 +1286,6 @@ Path SomeLocal Complete src/Completion.res 275:15 posCursor:[275:15] posNoWhite:[275:14] Found expr:[274:11->278:1] -Pexp_construct Function$:__ghost__[0:-1->0:-1] [274:11->278:1] posCursor:[275:15] posNoWhite:[275:14] Found expr:[274:11->278:1] posCursor:[275:15] posNoWhite:[275:14] Found expr:[275:5->277:3] posCursor:[275:15] posNoWhite:[275:14] Found expr:[275:13->275:15] @@ -1628,7 +1626,6 @@ posCursor:[336:26] posNoWhite:[336:25] Found expr:[333:3->346:23] JSX 333:6] onClick[334:4->334:11]=...[334:13->346:23]> _children:None posCursor:[336:26] posNoWhite:[336:25] Found expr:[334:13->346:23] posCursor:[336:26] posNoWhite:[336:25] Found expr:[334:13->338:6] -Pexp_construct Function$:__ghost__[0:-1->0:-1] [334:13->338:6] posCursor:[336:26] posNoWhite:[336:25] Found expr:[334:13->338:6] posCursor:[336:26] posNoWhite:[336:25] Found expr:[335:6->338:5] posCursor:[336:26] posNoWhite:[336:25] Found expr:[336:16->338:5] @@ -1731,7 +1728,6 @@ posCursor:[355:23] posNoWhite:[355:22] Found expr:[355:12->355:23] Complete src/Completion.res 362:8 posCursor:[362:8] posNoWhite:[362:7] Found expr:[360:8->365:3] -Pexp_construct Function$:__ghost__[0:-1->0:-1] [360:8->365:3] posCursor:[362:8] posNoWhite:[362:7] Found expr:[360:8->365:3] posCursor:[362:8] posNoWhite:[362:7] Found pattern:[362:7->364:5] posCursor:[362:8] posNoWhite:[362:7] Found pattern:[362:7->362:8] @@ -1782,7 +1778,6 @@ Path T Complete src/Completion.res 373:21 posCursor:[373:21] posNoWhite:[373:20] Found expr:[371:8->376:3] -Pexp_construct Function$:__ghost__[0:-1->0:-1] [371:8->376:3] posCursor:[373:21] posNoWhite:[373:20] Found expr:[371:8->376:3] posCursor:[373:21] posNoWhite:[373:20] Found pattern:[373:7->375:5] posCursor:[373:21] posNoWhite:[373:20] Found pattern:[373:7->373:21] @@ -1886,7 +1881,6 @@ Path funRecord Complete src/Completion.res 389:12 posCursor:[389:12] posNoWhite:[389:11] Found expr:[387:8->392:1] -Pexp_construct Function$:__ghost__[0:-1->0:-1] [387:8->392:1] posCursor:[389:12] posNoWhite:[389:11] Found expr:[387:8->392:1] posCursor:[389:12] posNoWhite:[389:11] Found expr:[388:2->391:4] posCursor:[389:12] posNoWhite:[389:11] Found expr:[389:6->391:4] @@ -1991,7 +1985,6 @@ Path r Complete src/Completion.res 409:21 posCursor:[409:21] posNoWhite:[409:20] Found expr:[408:14->415:1] -Pexp_construct Function$:__ghost__[0:-1->0:-1] [408:14->415:1] posCursor:[409:21] posNoWhite:[409:20] Found expr:[408:14->415:1] posCursor:[409:21] posNoWhite:[409:20] Found expr:[409:5->414:17] posCursor:[409:21] posNoWhite:[409:20] Found expr:[409:5->411:42] @@ -2019,7 +2012,6 @@ Path SomeLocalModule. Complete src/Completion.res 412:21 posCursor:[412:21] posNoWhite:[412:20] Found expr:[408:14->415:1] -Pexp_construct Function$:__ghost__[0:-1->0:-1] [408:14->415:1] posCursor:[412:21] posNoWhite:[412:20] Found expr:[408:14->415:1] posCursor:[412:21] posNoWhite:[412:20] Found expr:[411:2->414:17] posCursor:[412:21] posNoWhite:[412:20] Found expr:[412:5->414:17] diff --git a/analysis/tests/src/expected/CompletionFunctionArguments.res.txt b/analysis/tests/src/expected/CompletionFunctionArguments.res.txt index 139295fa6..7ca6e7bc8 100644 --- a/analysis/tests/src/expected/CompletionFunctionArguments.res.txt +++ b/analysis/tests/src/expected/CompletionFunctionArguments.res.txt @@ -370,7 +370,6 @@ Complete src/CompletionFunctionArguments.res 109:29 posCursor:[109:29] posNoWhite:[109:28] Found expr:[105:3->114:4] JSX 105:6] onMouseDown[106:4->106:15]=...[106:35->113:5]> _children:114:2 posCursor:[109:29] posNoWhite:[109:28] Found expr:[106:35->113:5] -Pexp_construct Function$:__ghost__[0:-1->0:-1] [106:16->113:5] posCursor:[109:29] posNoWhite:[109:28] Found expr:[106:16->113:5] posCursor:[109:29] posNoWhite:[109:28] Found expr:[107:6->109:29] posCursor:[109:29] posNoWhite:[109:28] Found expr:[108:6->109:29] @@ -397,7 +396,6 @@ Complete src/CompletionFunctionArguments.res 111:27 posCursor:[111:27] posNoWhite:[111:26] Found expr:[105:3->114:4] JSX 105:6] onMouseDown[106:4->106:15]=...[106:35->113:5]> _children:114:2 posCursor:[111:27] posNoWhite:[111:26] Found expr:[106:35->113:5] -Pexp_construct Function$:__ghost__[0:-1->0:-1] [106:16->113:5] posCursor:[111:27] posNoWhite:[111:26] Found expr:[106:16->113:5] posCursor:[111:27] posNoWhite:[111:26] Found expr:[107:6->111:27] posCursor:[111:27] posNoWhite:[111:26] Found expr:[108:6->111:27] diff --git a/analysis/tests/src/expected/CompletionInferValues.res.txt b/analysis/tests/src/expected/CompletionInferValues.res.txt index b1cdbd422..ae746b384 100644 --- a/analysis/tests/src/expected/CompletionInferValues.res.txt +++ b/analysis/tests/src/expected/CompletionInferValues.res.txt @@ -83,7 +83,6 @@ Complete src/CompletionInferValues.res 24:63 posCursor:[24:63] posNoWhite:[24:62] Found expr:[24:3->24:64] Pexp_apply ...[24:3->24:21] (...[24:22->24:63]) posCursor:[24:63] posNoWhite:[24:62] Found expr:[24:22->24:63] -Pexp_construct Function$:__ghost__[0:-1->0:-1] [24:23->24:63] posCursor:[24:63] posNoWhite:[24:62] Found expr:[24:23->24:63] posCursor:[24:63] posNoWhite:[24:62] Found expr:[24:36->24:63] posCursor:[24:63] posNoWhite:[24:62] Found expr:[24:42->24:63] @@ -117,7 +116,6 @@ Complete src/CompletionInferValues.res 27:90 posCursor:[27:90] posNoWhite:[27:89] Found expr:[27:39->27:91] Pexp_apply ...[27:39->27:48] (...[27:49->27:90]) posCursor:[27:90] posNoWhite:[27:89] Found expr:[27:49->27:90] -Pexp_construct Function$:__ghost__[0:-1->0:-1] [27:50->27:90] posCursor:[27:90] posNoWhite:[27:89] Found expr:[27:50->27:90] posCursor:[27:90] posNoWhite:[27:89] Found expr:[27:56->27:90] posCursor:[27:90] posNoWhite:[27:89] Found expr:[27:69->27:90] @@ -153,7 +151,6 @@ Complete src/CompletionInferValues.res 30:36 posCursor:[30:36] posNoWhite:[30:35] Found expr:[30:3->30:39] Pexp_apply ...[30:3->30:15] (...[30:16->30:38]) posCursor:[30:36] posNoWhite:[30:35] Found expr:[30:16->30:38] -Pexp_construct Function$:__ghost__[0:-1->0:-1] [30:16->30:38] posCursor:[30:36] posNoWhite:[30:35] Found expr:[30:16->30:38] posCursor:[30:36] posNoWhite:[30:35] Found expr:[30:27->30:36] Completable: Cpath Value[event]->pr @@ -182,7 +179,6 @@ Complete src/CompletionInferValues.res 41:50 posCursor:[41:50] posNoWhite:[41:49] Found expr:[41:12->41:56] JSX 41:15] onMouseEnter[41:16->41:28]=...[41:36->41:52]> _children:41:54 posCursor:[41:50] posNoWhite:[41:49] Found expr:[41:36->41:52] -Pexp_construct Function$:__ghost__[0:-1->0:-1] [41:29->41:52] posCursor:[41:50] posNoWhite:[41:49] Found expr:[41:29->41:52] posCursor:[41:50] posNoWhite:[41:49] Found expr:[41:41->41:50] Completable: Cpath Value[event]->pr <> @@ -211,7 +207,6 @@ Complete src/CompletionInferValues.res 44:50 posCursor:[44:50] posNoWhite:[44:49] Found expr:[44:12->44:56] JSX 44:15] onMouseEnter[44:16->44:28]=...[44:36->44:52]> _children:44:54 posCursor:[44:50] posNoWhite:[44:49] Found expr:[44:36->44:52] -Pexp_construct Function$:__ghost__[0:-1->0:-1] [44:29->44:52] posCursor:[44:50] posNoWhite:[44:49] Found expr:[44:29->44:52] posCursor:[44:50] posNoWhite:[44:49] Found expr:[44:41->44:50] Completable: Cpath Value[event]->pr <> @@ -239,7 +234,6 @@ Complete src/CompletionInferValues.res 47:87 posCursor:[47:87] posNoWhite:[47:86] Found expr:[47:12->47:93] JSX 47:15] onMouseEnter[47:16->47:28]=...[47:36->47:89]> _children:47:91 posCursor:[47:87] posNoWhite:[47:86] Found expr:[47:36->47:89] -Pexp_construct Function$:__ghost__[0:-1->0:-1] [47:29->47:89] posCursor:[47:87] posNoWhite:[47:86] Found expr:[47:29->47:89] posCursor:[47:87] posNoWhite:[47:86] Found expr:[47:41->47:87] posCursor:[47:87] posNoWhite:[47:86] Found expr:[47:81->47:87] @@ -272,7 +266,6 @@ Complete src/CompletionInferValues.res 50:108 posCursor:[50:108] posNoWhite:[50:107] Found expr:[50:12->50:114] JSX 50:15] onMouseEnter[50:16->50:28]=...[50:36->50:110]> _children:50:112 posCursor:[50:108] posNoWhite:[50:107] Found expr:[50:36->50:110] -Pexp_construct Function$:__ghost__[0:-1->0:-1] [50:29->50:110] posCursor:[50:108] posNoWhite:[50:107] Found expr:[50:29->50:110] posCursor:[50:108] posNoWhite:[50:107] Found expr:[50:41->50:108] posCursor:[50:108] posNoWhite:[50:107] Found expr:[50:100->50:108] @@ -317,7 +310,6 @@ Complete src/CompletionInferValues.res 53:130 posCursor:[53:130] posNoWhite:[53:129] Found expr:[53:12->53:136] JSX 53:15] onMouseEnter[53:16->53:28]=...[53:36->53:132]> _children:53:134 posCursor:[53:130] posNoWhite:[53:129] Found expr:[53:36->53:132] -Pexp_construct Function$:__ghost__[0:-1->0:-1] [53:29->53:132] posCursor:[53:130] posNoWhite:[53:129] Found expr:[53:29->53:132] posCursor:[53:130] posNoWhite:[53:129] Found expr:[53:41->53:130] posCursor:[53:130] posNoWhite:[53:129] Found expr:[53:123->53:130] @@ -695,7 +687,6 @@ Complete src/CompletionInferValues.res 130:26 posCursor:[130:26] posNoWhite:[130:25] Found expr:[130:3->130:37] Pexp_apply ...[130:3->130:23] (...[130:24->130:36]) posCursor:[130:26] posNoWhite:[130:25] Found expr:[130:24->130:36] -Pexp_construct Function$:__ghost__[0:-1->0:-1] [130:25->130:36] posCursor:[130:26] posNoWhite:[130:25] Found expr:[130:25->130:36] posCursor:[130:26] posNoWhite:[130:25] Found pattern:[130:25->130:27] posCursor:[130:26] posNoWhite:[130:25] Found pattern:[130:25->130:27] @@ -724,7 +715,6 @@ Complete src/CompletionInferValues.res 137:30 posCursor:[137:30] posNoWhite:[137:29] Found expr:[137:3->137:33] Pexp_apply ...[137:3->137:6] (~cb137:8->137:10=...[137:11->137:32]) posCursor:[137:30] posNoWhite:[137:29] Found expr:[137:11->137:32] -Pexp_construct Function$:__ghost__[0:-1->0:-1] [137:12->137:32] posCursor:[137:30] posNoWhite:[137:29] Found expr:[137:12->137:32] posCursor:[137:30] posNoWhite:[137:29] Found expr:[137:24->0:-1] posCursor:[137:30] posNoWhite:[137:29] Found expr:[137:24->0:-1] @@ -761,7 +751,6 @@ Complete src/CompletionInferValues.res 146:30 posCursor:[146:30] posNoWhite:[146:29] Found expr:[146:3->146:33] Pexp_apply ...[146:3->146:6] (~cb146:8->146:10=...[146:11->146:32]) posCursor:[146:30] posNoWhite:[146:29] Found expr:[146:11->146:32] -Pexp_construct Function$:__ghost__[0:-1->0:-1] [146:12->146:32] posCursor:[146:30] posNoWhite:[146:29] Found expr:[146:12->146:32] posCursor:[146:30] posNoWhite:[146:29] Found expr:[146:24->0:-1] posCursor:[146:30] posNoWhite:[146:29] Found expr:[146:24->0:-1] @@ -842,7 +831,6 @@ Complete src/CompletionInferValues.res 158:105 posCursor:[158:105] posNoWhite:[158:104] Found expr:[158:18->158:110] Pexp_apply ...[158:18->158:49] (~prepare158:51->158:58=...[158:59->158:72], ~render158:74->158:80=...[158:81->158:106], ...[158:107->158:109]) posCursor:[158:105] posNoWhite:[158:104] Found expr:[158:81->158:106] -Pexp_construct Function$:__ghost__[0:-1->0:-1] [158:82->158:106] posCursor:[158:105] posNoWhite:[158:104] Found expr:[158:82->158:106] posCursor:[158:105] posNoWhite:[158:104] Found expr:[158:97->158:105] Pexp_field [158:97->158:104] _:[158:105->158:105] @@ -869,7 +857,6 @@ Complete src/CompletionInferValues.res 162:110 posCursor:[162:110] posNoWhite:[162:109] Found expr:[162:18->162:115] Pexp_apply ...[162:18->162:49] (~prepare162:51->162:58=...[162:59->162:72], ~render162:74->162:80=...[162:81->162:111], ...[162:112->162:114]) posCursor:[162:110] posNoWhite:[162:109] Found expr:[162:81->162:111] -Pexp_construct Function$:__ghost__[0:-1->0:-1] [162:82->162:111] posCursor:[162:110] posNoWhite:[162:109] Found expr:[162:82->162:111] posCursor:[162:110] posNoWhite:[162:109] Found expr:[162:104->0:-1] posCursor:[162:110] posNoWhite:[162:109] Found expr:[162:104->0:-1] diff --git a/analysis/tests/src/expected/CompletionJsx.res.txt b/analysis/tests/src/expected/CompletionJsx.res.txt index 61a0b6a3a..3d239e202 100644 --- a/analysis/tests/src/expected/CompletionJsx.res.txt +++ b/analysis/tests/src/expected/CompletionJsx.res.txt @@ -24,7 +24,6 @@ Path Js.String2.st Complete src/CompletionJsx.res 13:21 posCursor:[13:21] posNoWhite:[13:20] Found expr:[8:13->33:3] -Pexp_construct Function$:__ghost__[0:-1->0:-1] [8:14->33:3] posCursor:[13:21] posNoWhite:[13:20] Found expr:[8:14->33:3] posCursor:[13:21] posNoWhite:[13:20] Found expr:[9:4->32:10] posCursor:[13:21] posNoWhite:[13:20] Found expr:[10:4->32:10] @@ -64,7 +63,6 @@ Path Js.String2.st Complete src/CompletionJsx.res 18:24 posCursor:[18:24] posNoWhite:[18:23] Found expr:[8:13->33:3] -Pexp_construct Function$:__ghost__[0:-1->0:-1] [8:14->33:3] posCursor:[18:24] posNoWhite:[18:23] Found expr:[8:14->33:3] posCursor:[18:24] posNoWhite:[18:23] Found expr:[9:4->32:10] posCursor:[18:24] posNoWhite:[18:23] Found expr:[10:4->32:10] @@ -114,7 +112,6 @@ Path Js.String2.st Complete src/CompletionJsx.res 20:27 posCursor:[20:27] posNoWhite:[20:26] Found expr:[8:13->33:3] -Pexp_construct Function$:__ghost__[0:-1->0:-1] [8:14->33:3] posCursor:[20:27] posNoWhite:[20:26] Found expr:[8:14->33:3] posCursor:[20:27] posNoWhite:[20:26] Found expr:[9:4->32:10] posCursor:[20:27] posNoWhite:[20:26] Found expr:[10:4->32:10] @@ -163,7 +160,6 @@ Path Js.String2.st Complete src/CompletionJsx.res 22:44 posCursor:[22:44] posNoWhite:[22:43] Found expr:[8:13->33:3] -Pexp_construct Function$:__ghost__[0:-1->0:-1] [8:14->33:3] posCursor:[22:44] posNoWhite:[22:43] Found expr:[8:14->33:3] posCursor:[22:44] posNoWhite:[22:43] Found expr:[9:4->32:10] posCursor:[22:44] posNoWhite:[22:43] Found expr:[10:4->32:10] @@ -214,7 +210,6 @@ Path Js.String2.st Complete src/CompletionJsx.res 24:19 posCursor:[24:19] posNoWhite:[24:18] Found expr:[8:13->33:3] -Pexp_construct Function$:__ghost__[0:-1->0:-1] [8:14->33:3] posCursor:[24:19] posNoWhite:[24:18] Found expr:[8:14->33:3] posCursor:[24:19] posNoWhite:[24:18] Found expr:[9:4->32:10] posCursor:[24:19] posNoWhite:[24:18] Found expr:[10:4->32:10] @@ -300,7 +295,6 @@ Path Belt.Int. Complete src/CompletionJsx.res 26:14 posCursor:[26:14] posNoWhite:[26:13] Found expr:[8:13->33:3] -Pexp_construct Function$:__ghost__[0:-1->0:-1] [8:14->33:3] posCursor:[26:14] posNoWhite:[26:13] Found expr:[8:14->33:3] posCursor:[26:14] posNoWhite:[26:13] Found expr:[9:4->32:10] posCursor:[26:14] posNoWhite:[26:13] Found expr:[10:4->32:10] @@ -385,7 +379,6 @@ Path Belt.Int. Complete src/CompletionJsx.res 28:20 posCursor:[28:20] posNoWhite:[28:19] Found expr:[8:13->33:3] -Pexp_construct Function$:__ghost__[0:-1->0:-1] [8:14->33:3] posCursor:[28:20] posNoWhite:[28:19] Found expr:[8:14->33:3] posCursor:[28:20] posNoWhite:[28:19] Found expr:[9:4->32:10] posCursor:[28:20] posNoWhite:[28:19] Found expr:[10:4->32:10] @@ -429,7 +422,6 @@ Path Js.Array2.a Complete src/CompletionJsx.res 30:12 posCursor:[30:12] posNoWhite:[30:11] Found expr:[8:13->33:3] -Pexp_construct Function$:__ghost__[0:-1->0:-1] [8:14->33:3] posCursor:[30:12] posNoWhite:[30:11] Found expr:[8:14->33:3] posCursor:[30:12] posNoWhite:[30:11] Found expr:[9:4->32:10] posCursor:[30:12] posNoWhite:[30:11] Found expr:[10:4->32:10] diff --git a/analysis/tests/src/expected/CompletionPipeChain.res.txt b/analysis/tests/src/expected/CompletionPipeChain.res.txt index 7717d5257..f17db8b79 100644 --- a/analysis/tests/src/expected/CompletionPipeChain.res.txt +++ b/analysis/tests/src/expected/CompletionPipeChain.res.txt @@ -440,7 +440,6 @@ Complete src/CompletionPipeChain.res 82:30 posCursor:[82:30] posNoWhite:[82:29] Found expr:[76:15->93:1] Pexp_apply ...[76:15->76:46] (~prepare77:3->77:10=...[77:11->77:24], ~render78:3->78:9=...[78:10->91:3], ...[92:2->92:4]) posCursor:[82:30] posNoWhite:[82:29] Found expr:[78:10->91:3] -Pexp_construct Function$:__ghost__[0:-1->0:-1] [78:10->91:3] posCursor:[82:30] posNoWhite:[82:29] Found expr:[78:10->91:3] posCursor:[82:30] posNoWhite:[82:29] Found expr:[79:4->90:14] posCursor:[82:30] posNoWhite:[82:29] Found expr:[82:7->90:14] @@ -469,7 +468,6 @@ Complete src/CompletionPipeChain.res 88:16 posCursor:[88:16] posNoWhite:[88:15] Found expr:[76:15->93:1] Pexp_apply ...[76:15->76:46] (~prepare77:3->77:10=...[77:11->77:24], ~render78:3->78:9=...[78:10->91:3], ...[92:2->92:4]) posCursor:[88:16] posNoWhite:[88:15] Found expr:[78:10->91:3] -Pexp_construct Function$:__ghost__[0:-1->0:-1] [78:10->91:3] posCursor:[88:16] posNoWhite:[88:15] Found expr:[78:10->91:3] posCursor:[88:16] posNoWhite:[88:15] Found expr:[79:4->90:14] posCursor:[88:16] posNoWhite:[88:15] Found expr:[84:4->90:14] diff --git a/analysis/tests/src/expected/Destructuring.res.txt b/analysis/tests/src/expected/Destructuring.res.txt index 931b3e9f4..c85f233a6 100644 --- a/analysis/tests/src/expected/Destructuring.res.txt +++ b/analysis/tests/src/expected/Destructuring.res.txt @@ -36,7 +36,6 @@ Path x Complete src/Destructuring.res 11:13 posCursor:[11:13] posNoWhite:[11:11] Found expr:[10:8->14:1] -Pexp_construct Function$:__ghost__[0:-1->0:-1] [10:9->14:1] posCursor:[11:13] posNoWhite:[11:11] Found expr:[10:9->14:1] posCursor:[11:13] posNoWhite:[11:11] Found expr:[11:2->13:6] posCursor:[11:13] posNoWhite:[11:11] Found pattern:[11:6->11:14] @@ -55,7 +54,6 @@ Path x Complete src/Destructuring.res 17:10 posCursor:[17:10] posNoWhite:[17:9] Found expr:[16:9->20:1] -Pexp_construct Function$:__ghost__[0:-1->0:-1] [16:10->20:1] posCursor:[17:10] posNoWhite:[17:9] Found expr:[16:10->20:1] posCursor:[17:10] posNoWhite:[17:9] Found expr:[17:5->19:11] posCursor:[17:10] posNoWhite:[17:9] Found pattern:[17:9->17:11] From e68992e476d8ba8f2aabe656319a14934818d4c3 Mon Sep 17 00:00:00 2001 From: Gabriel Nordeborn Date: Thu, 17 Aug 2023 14:14:20 +0200 Subject: [PATCH 05/11] read config so uncurried mode is propagated when creating interface files --- analysis/src/CreateInterface.ml | 2 ++ analysis/tests/src/expected/CreateInterface.res.txt | 2 +- 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/analysis/src/CreateInterface.ml b/analysis/src/CreateInterface.ml index 184dd604b..023f38dc3 100644 --- a/analysis/src/CreateInterface.ml +++ b/analysis/src/CreateInterface.ml @@ -414,6 +414,8 @@ let printSignature ~extractor ~signature = let command ~path ~cmiFile = match Shared.tryReadCmi cmiFile with | Some cmi_info -> + (* For reading the config *) + let _ = Cmt.loadFullCmtFromPath ~path in let extractor = SourceFileExtractor.create ~path in printSignature ~extractor ~signature:cmi_info.cmi_sign | None -> "" diff --git a/analysis/tests/src/expected/CreateInterface.res.txt b/analysis/tests/src/expected/CreateInterface.res.txt index d48442879..4e1212948 100644 --- a/analysis/tests/src/expected/CreateInterface.res.txt +++ b/analysis/tests/src/expected/CreateInterface.res.txt @@ -1,6 +1,6 @@ Create Interface src/CreateInterface.res type r = {name: string, age: int} -let add: (. ~x: int, ~y: int) => int +let add: (~x: int, ~y: int) => int @react.component let make: (~name: string) => React.element module Other: { From daef07d8cf47fc59027fc288815b38e362fcda74 Mon Sep 17 00:00:00 2001 From: Gabriel Nordeborn Date: Thu, 17 Aug 2023 18:23:31 +0200 Subject: [PATCH 06/11] turn off uncurried again for the tests --- analysis/tests/bsconfig.json | 2 +- .../tests/src/expected/Completion.res.txt | 36 +++++----- .../CompletionFunctionArguments.res.txt | 2 - .../expected/CompletionInferValues.res.txt | 33 +++------ .../tests/src/expected/CompletionJsx.res.txt | 8 --- .../src/expected/CompletionJsxProps.res.txt | 6 +- .../src/expected/CompletionPipeChain.res.txt | 2 - .../tests/src/expected/Definition.res.txt | 2 +- .../tests/src/expected/Destructuring.res.txt | 2 - analysis/tests/src/expected/Hover.res.txt | 8 +-- .../tests/src/expected/SignatureHelp.res.txt | 67 ++++++++++--------- 11 files changed, 73 insertions(+), 95 deletions(-) diff --git a/analysis/tests/bsconfig.json b/analysis/tests/bsconfig.json index ab1c00f56..14f838fdd 100644 --- a/analysis/tests/bsconfig.json +++ b/analysis/tests/bsconfig.json @@ -1,5 +1,5 @@ { - "uncurried": true, + "uncurried": false, "name": "test", "reanalyze": { "analysis": ["dce"] diff --git a/analysis/tests/src/expected/Completion.res.txt b/analysis/tests/src/expected/Completion.res.txt index 63b6b2f37..db7e4d240 100644 --- a/analysis/tests/src/expected/Completion.res.txt +++ b/analysis/tests/src/expected/Completion.res.txt @@ -28,7 +28,7 @@ Path MyList.m "label": "mapReverse2U", "kind": 12, "tags": [], - "detail": "(t<'a>, t<'b>, ('a, 'b) => 'c) => t<'c>", + "detail": "(t<'a>, t<'b>, (. 'a, 'b) => 'c) => t<'c>", "documentation": {"kind": "markdown", "value": " Uncurried version of [mapReverse2](#mapReverse2). "} }, { "label": "map", @@ -40,19 +40,19 @@ Path MyList.m "label": "mapWithIndexU", "kind": 12, "tags": [], - "detail": "(t<'a>, (int, 'a) => 'b) => t<'b>", + "detail": "(t<'a>, (. int, 'a) => 'b) => t<'b>", "documentation": {"kind": "markdown", "value": " Uncurried version of [mapWithIndex](#mapWithIndex). "} }, { "label": "mapU", "kind": 12, "tags": [], - "detail": "(t<'a>, 'a => 'b) => t<'b>", + "detail": "(t<'a>, (. 'a) => 'b) => t<'b>", "documentation": {"kind": "markdown", "value": " Uncurried version of [map](#map). "} }, { "label": "makeByU", "kind": 12, "tags": [], - "detail": "(int, int => 'a) => t<'a>", + "detail": "(int, (. int) => 'a) => t<'a>", "documentation": {"kind": "markdown", "value": " Uncurried version of [makeBy](#makeBy) "} }, { "label": "mapReverse2", @@ -70,7 +70,7 @@ Path MyList.m "label": "mapReverseU", "kind": 12, "tags": [], - "detail": "(t<'a>, 'a => 'b) => t<'b>", + "detail": "(t<'a>, (. 'a) => 'b) => t<'b>", "documentation": {"kind": "markdown", "value": " Uncurried version of [mapReverse](#mapReverse). "} }] @@ -451,7 +451,7 @@ Path Belt.Option.e "label": "Belt.Option.eqU", "kind": 12, "tags": [], - "detail": "(option<'a>, option<'b>, ('a, 'b) => bool) => bool", + "detail": "(option<'a>, option<'b>, (. 'a, 'b) => bool) => bool", "documentation": {"kind": "markdown", "value": "\n Uncurried version of `eq`\n"} }, { "label": "Belt.Option.eq", @@ -508,7 +508,7 @@ Path Js.Dict.u "label": "unsafeDeleteKey", "kind": 12, "tags": [], - "detail": "(t, string) => unit", + "detail": "(. t, string) => unit", "documentation": {"kind": "markdown", "value": " Experimental internal function "} }] @@ -765,7 +765,6 @@ Path Objects.Rec.recordVal Complete src/Completion.res 120:7 posCursor:[120:7] posNoWhite:[120:6] Found expr:[119:11->123:1] -posCursor:[120:7] posNoWhite:[120:6] Found expr:[119:11->123:1] posCursor:[120:7] posNoWhite:[120:6] Found expr:[120:5->122:5] posCursor:[120:7] posNoWhite:[120:6] Found expr:[120:5->120:7] Pexp_ident my:[120:5->120:7] @@ -1286,7 +1285,6 @@ Path SomeLocal Complete src/Completion.res 275:15 posCursor:[275:15] posNoWhite:[275:14] Found expr:[274:11->278:1] -posCursor:[275:15] posNoWhite:[275:14] Found expr:[274:11->278:1] posCursor:[275:15] posNoWhite:[275:14] Found expr:[275:5->277:3] posCursor:[275:15] posNoWhite:[275:14] Found expr:[275:13->275:15] Pexp_ident _w:[275:13->275:15] @@ -1599,8 +1597,14 @@ Resolved opens 3 Completion.res Completion.res pervasives ContextPath Value[withCallback](~a) ContextPath Value[withCallback] Path withCallback -Found type for function int -[] +Found type for function (~b: int) => int +[{ + "label": "b", + "kind": 4, + "tags": [], + "detail": "int", + "documentation": null + }] Complete src/Completion.res 329:21 posCursor:[329:21] posNoWhite:[329:20] Found expr:[329:3->329:21] @@ -1626,7 +1630,6 @@ posCursor:[336:26] posNoWhite:[336:25] Found expr:[333:3->346:23] JSX 333:6] onClick[334:4->334:11]=...[334:13->346:23]> _children:None posCursor:[336:26] posNoWhite:[336:25] Found expr:[334:13->346:23] posCursor:[336:26] posNoWhite:[336:25] Found expr:[334:13->338:6] -posCursor:[336:26] posNoWhite:[336:25] Found expr:[334:13->338:6] posCursor:[336:26] posNoWhite:[336:25] Found expr:[335:6->338:5] posCursor:[336:26] posNoWhite:[336:25] Found expr:[336:16->338:5] posCursor:[336:26] posNoWhite:[336:25] Found pattern:[336:20->338:5] @@ -1728,7 +1731,6 @@ posCursor:[355:23] posNoWhite:[355:22] Found expr:[355:12->355:23] Complete src/Completion.res 362:8 posCursor:[362:8] posNoWhite:[362:7] Found expr:[360:8->365:3] -posCursor:[362:8] posNoWhite:[362:7] Found expr:[360:8->365:3] posCursor:[362:8] posNoWhite:[362:7] Found pattern:[362:7->364:5] posCursor:[362:8] posNoWhite:[362:7] Found pattern:[362:7->362:8] Ppat_construct T:[362:7->362:8] @@ -1778,7 +1780,6 @@ Path T Complete src/Completion.res 373:21 posCursor:[373:21] posNoWhite:[373:20] Found expr:[371:8->376:3] -posCursor:[373:21] posNoWhite:[373:20] Found expr:[371:8->376:3] posCursor:[373:21] posNoWhite:[373:20] Found pattern:[373:7->375:5] posCursor:[373:21] posNoWhite:[373:20] Found pattern:[373:7->373:21] Ppat_construct AndThatOther.T:[373:7->373:21] @@ -1881,7 +1882,6 @@ Path funRecord Complete src/Completion.res 389:12 posCursor:[389:12] posNoWhite:[389:11] Found expr:[387:8->392:1] -posCursor:[389:12] posNoWhite:[389:11] Found expr:[387:8->392:1] posCursor:[389:12] posNoWhite:[389:11] Found expr:[388:2->391:4] posCursor:[389:12] posNoWhite:[389:11] Found expr:[389:6->391:4] posCursor:[389:12] posNoWhite:[389:11] Found expr:[389:6->389:12] @@ -1985,7 +1985,6 @@ Path r Complete src/Completion.res 409:21 posCursor:[409:21] posNoWhite:[409:20] Found expr:[408:14->415:1] -posCursor:[409:21] posNoWhite:[409:20] Found expr:[408:14->415:1] posCursor:[409:21] posNoWhite:[409:20] Found expr:[409:5->414:17] posCursor:[409:21] posNoWhite:[409:20] Found expr:[409:5->411:42] posCursor:[409:21] posNoWhite:[409:20] Found expr:[409:5->411:5] @@ -2012,7 +2011,6 @@ Path SomeLocalModule. Complete src/Completion.res 412:21 posCursor:[412:21] posNoWhite:[412:20] Found expr:[408:14->415:1] -posCursor:[412:21] posNoWhite:[412:20] Found expr:[408:14->415:1] posCursor:[412:21] posNoWhite:[412:20] Found expr:[411:2->414:17] posCursor:[412:21] posNoWhite:[412:20] Found expr:[412:5->414:17] Pexp_apply ...[412:5->414:8] (...[414:9->414:16]) @@ -2198,13 +2196,13 @@ Resolved opens 3 Completion.res Completion.res pervasives ContextPath Type[withUncurried] Path withUncurried [{ - "label": "v => {}", + "label": "(. v) => {}", "kind": 12, "tags": [], "detail": "int => unit", "documentation": null, "sortText": "A", - "insertText": "${1:v} => {$0}", + "insertText": "(. ${1:v}) => {$0}", "insertTextFormat": 2 }] diff --git a/analysis/tests/src/expected/CompletionFunctionArguments.res.txt b/analysis/tests/src/expected/CompletionFunctionArguments.res.txt index 7ca6e7bc8..d15f00087 100644 --- a/analysis/tests/src/expected/CompletionFunctionArguments.res.txt +++ b/analysis/tests/src/expected/CompletionFunctionArguments.res.txt @@ -370,7 +370,6 @@ Complete src/CompletionFunctionArguments.res 109:29 posCursor:[109:29] posNoWhite:[109:28] Found expr:[105:3->114:4] JSX 105:6] onMouseDown[106:4->106:15]=...[106:35->113:5]> _children:114:2 posCursor:[109:29] posNoWhite:[109:28] Found expr:[106:35->113:5] -posCursor:[109:29] posNoWhite:[109:28] Found expr:[106:16->113:5] posCursor:[109:29] posNoWhite:[109:28] Found expr:[107:6->109:29] posCursor:[109:29] posNoWhite:[109:28] Found expr:[108:6->109:29] posCursor:[109:29] posNoWhite:[109:28] Found expr:[109:9->109:29] @@ -396,7 +395,6 @@ Complete src/CompletionFunctionArguments.res 111:27 posCursor:[111:27] posNoWhite:[111:26] Found expr:[105:3->114:4] JSX 105:6] onMouseDown[106:4->106:15]=...[106:35->113:5]> _children:114:2 posCursor:[111:27] posNoWhite:[111:26] Found expr:[106:35->113:5] -posCursor:[111:27] posNoWhite:[111:26] Found expr:[106:16->113:5] posCursor:[111:27] posNoWhite:[111:26] Found expr:[107:6->111:27] posCursor:[111:27] posNoWhite:[111:26] Found expr:[108:6->111:27] posCursor:[111:27] posNoWhite:[111:26] Found expr:[111:9->111:27] diff --git a/analysis/tests/src/expected/CompletionInferValues.res.txt b/analysis/tests/src/expected/CompletionInferValues.res.txt index ae746b384..a47abf607 100644 --- a/analysis/tests/src/expected/CompletionInferValues.res.txt +++ b/analysis/tests/src/expected/CompletionInferValues.res.txt @@ -83,7 +83,6 @@ Complete src/CompletionInferValues.res 24:63 posCursor:[24:63] posNoWhite:[24:62] Found expr:[24:3->24:64] Pexp_apply ...[24:3->24:21] (...[24:22->24:63]) posCursor:[24:63] posNoWhite:[24:62] Found expr:[24:22->24:63] -posCursor:[24:63] posNoWhite:[24:62] Found expr:[24:23->24:63] posCursor:[24:63] posNoWhite:[24:62] Found expr:[24:36->24:63] posCursor:[24:63] posNoWhite:[24:62] Found expr:[24:42->24:63] posCursor:[24:63] posNoWhite:[24:62] Found expr:[24:52->24:63] @@ -116,7 +115,6 @@ Complete src/CompletionInferValues.res 27:90 posCursor:[27:90] posNoWhite:[27:89] Found expr:[27:39->27:91] Pexp_apply ...[27:39->27:48] (...[27:49->27:90]) posCursor:[27:90] posNoWhite:[27:89] Found expr:[27:49->27:90] -posCursor:[27:90] posNoWhite:[27:89] Found expr:[27:50->27:90] posCursor:[27:90] posNoWhite:[27:89] Found expr:[27:56->27:90] posCursor:[27:90] posNoWhite:[27:89] Found expr:[27:69->27:90] posCursor:[27:90] posNoWhite:[27:89] Found expr:[27:79->27:90] @@ -151,7 +149,6 @@ Complete src/CompletionInferValues.res 30:36 posCursor:[30:36] posNoWhite:[30:35] Found expr:[30:3->30:39] Pexp_apply ...[30:3->30:15] (...[30:16->30:38]) posCursor:[30:36] posNoWhite:[30:35] Found expr:[30:16->30:38] -posCursor:[30:36] posNoWhite:[30:35] Found expr:[30:16->30:38] posCursor:[30:36] posNoWhite:[30:35] Found expr:[30:27->30:36] Completable: Cpath Value[event]->pr Package opens Pervasives.JsxModules.place holder @@ -179,7 +176,6 @@ Complete src/CompletionInferValues.res 41:50 posCursor:[41:50] posNoWhite:[41:49] Found expr:[41:12->41:56] JSX 41:15] onMouseEnter[41:16->41:28]=...[41:36->41:52]> _children:41:54 posCursor:[41:50] posNoWhite:[41:49] Found expr:[41:36->41:52] -posCursor:[41:50] posNoWhite:[41:49] Found expr:[41:29->41:52] posCursor:[41:50] posNoWhite:[41:49] Found expr:[41:41->41:50] Completable: Cpath Value[event]->pr <> Package opens Pervasives.JsxModules.place holder @@ -190,13 +186,13 @@ Path event ContextPath CArgument CJsxPropValue [div] onMouseEnter($0) ContextPath CJsxPropValue [div] onMouseEnter Path ReactDOM.domProps -Path PervasivesU.JsxDOM.domProps +Path Pervasives.JsxDOM.domProps CPPipe env:CompletionInferValues -CPPipe type path:JsxEventU.Mouse.t -CPPipe pathFromEnv:JsxEventU.Mouse found:false -Path JsxEventU.Mouse.pr +CPPipe type path:JsxEventC.Mouse.t +CPPipe pathFromEnv:JsxEventC.Mouse found:false +Path JsxEventC.Mouse.pr [{ - "label": "JsxEventU.Mouse.preventDefault", + "label": "JsxEventC.Mouse.preventDefault", "kind": 12, "tags": [], "detail": "t => unit", @@ -207,7 +203,6 @@ Complete src/CompletionInferValues.res 44:50 posCursor:[44:50] posNoWhite:[44:49] Found expr:[44:12->44:56] JSX 44:15] onMouseEnter[44:16->44:28]=...[44:36->44:52]> _children:44:54 posCursor:[44:50] posNoWhite:[44:49] Found expr:[44:36->44:52] -posCursor:[44:50] posNoWhite:[44:49] Found expr:[44:29->44:52] posCursor:[44:50] posNoWhite:[44:49] Found expr:[44:41->44:50] Completable: Cpath Value[event]->pr <> Package opens Pervasives.JsxModules.place holder @@ -219,11 +214,11 @@ ContextPath CArgument CJsxPropValue [Div] onMouseEnter($0) ContextPath CJsxPropValue [Div] onMouseEnter Path Div.make CPPipe env:CompletionInferValues envFromCompletionItem:CompletionInferValues.Div -CPPipe type path:PervasivesU.JsxEvent.Mouse.t -CPPipe pathFromEnv:PervasivesU.JsxEvent.Mouse found:false -Path PervasivesU.JsxEvent.Mouse.pr +CPPipe type path:Pervasives.JsxEvent.Mouse.t +CPPipe pathFromEnv:Pervasives.JsxEvent.Mouse found:false +Path Pervasives.JsxEvent.Mouse.pr [{ - "label": "PervasivesU.JsxEvent.Mouse.preventDefault", + "label": "Pervasives.JsxEvent.Mouse.preventDefault", "kind": 12, "tags": [], "detail": "t => unit", @@ -234,7 +229,6 @@ Complete src/CompletionInferValues.res 47:87 posCursor:[47:87] posNoWhite:[47:86] Found expr:[47:12->47:93] JSX 47:15] onMouseEnter[47:16->47:28]=...[47:36->47:89]> _children:47:91 posCursor:[47:87] posNoWhite:[47:86] Found expr:[47:36->47:89] -posCursor:[47:87] posNoWhite:[47:86] Found expr:[47:29->47:89] posCursor:[47:87] posNoWhite:[47:86] Found expr:[47:41->47:87] posCursor:[47:87] posNoWhite:[47:86] Found expr:[47:81->47:87] Completable: Cpath Value[btn]->t <> @@ -246,7 +240,7 @@ Path btn ContextPath Value[JsxEvent, Mouse, button](Nolabel) ContextPath Value[JsxEvent, Mouse, button] Path JsxEvent.Mouse.button -CPPipe env:CompletionInferValues envFromCompletionItem:JsxEventU.Mouse +CPPipe env:CompletionInferValues envFromCompletionItem:JsxEventC.Mouse Path Belt.Int.t [{ "label": "Belt.Int.toString", @@ -266,7 +260,6 @@ Complete src/CompletionInferValues.res 50:108 posCursor:[50:108] posNoWhite:[50:107] Found expr:[50:12->50:114] JSX 50:15] onMouseEnter[50:16->50:28]=...[50:36->50:110]> _children:50:112 posCursor:[50:108] posNoWhite:[50:107] Found expr:[50:36->50:110] -posCursor:[50:108] posNoWhite:[50:107] Found expr:[50:29->50:110] posCursor:[50:108] posNoWhite:[50:107] Found expr:[50:41->50:108] posCursor:[50:108] posNoWhite:[50:107] Found expr:[50:100->50:108] Completable: Cpath Value[btn]->spl <> @@ -310,7 +303,6 @@ Complete src/CompletionInferValues.res 53:130 posCursor:[53:130] posNoWhite:[53:129] Found expr:[53:12->53:136] JSX 53:15] onMouseEnter[53:16->53:28]=...[53:36->53:132]> _children:53:134 posCursor:[53:130] posNoWhite:[53:129] Found expr:[53:36->53:132] -posCursor:[53:130] posNoWhite:[53:129] Found expr:[53:29->53:132] posCursor:[53:130] posNoWhite:[53:129] Found expr:[53:41->53:130] posCursor:[53:130] posNoWhite:[53:129] Found expr:[53:123->53:130] Completable: Cpath Value[btn]->ma <> @@ -687,7 +679,6 @@ Complete src/CompletionInferValues.res 130:26 posCursor:[130:26] posNoWhite:[130:25] Found expr:[130:3->130:37] Pexp_apply ...[130:3->130:23] (...[130:24->130:36]) posCursor:[130:26] posNoWhite:[130:25] Found expr:[130:24->130:36] -posCursor:[130:26] posNoWhite:[130:25] Found expr:[130:25->130:36] posCursor:[130:26] posNoWhite:[130:25] Found pattern:[130:25->130:27] posCursor:[130:26] posNoWhite:[130:25] Found pattern:[130:25->130:27] Completable: Cpattern CArgument CArgument Value[fnWithRecordCallback]($0)($0)->recordBody @@ -715,7 +706,6 @@ Complete src/CompletionInferValues.res 137:30 posCursor:[137:30] posNoWhite:[137:29] Found expr:[137:3->137:33] Pexp_apply ...[137:3->137:6] (~cb137:8->137:10=...[137:11->137:32]) posCursor:[137:30] posNoWhite:[137:29] Found expr:[137:11->137:32] -posCursor:[137:30] posNoWhite:[137:29] Found expr:[137:12->137:32] posCursor:[137:30] posNoWhite:[137:29] Found expr:[137:24->0:-1] posCursor:[137:30] posNoWhite:[137:29] Found expr:[137:24->0:-1] Completable: Cpath Value[root]-> @@ -751,7 +741,6 @@ Complete src/CompletionInferValues.res 146:30 posCursor:[146:30] posNoWhite:[146:29] Found expr:[146:3->146:33] Pexp_apply ...[146:3->146:6] (~cb146:8->146:10=...[146:11->146:32]) posCursor:[146:30] posNoWhite:[146:29] Found expr:[146:11->146:32] -posCursor:[146:30] posNoWhite:[146:29] Found expr:[146:12->146:32] posCursor:[146:30] posNoWhite:[146:29] Found expr:[146:24->0:-1] posCursor:[146:30] posNoWhite:[146:29] Found expr:[146:24->0:-1] Completable: Cpath Value[root]-> @@ -831,7 +820,6 @@ Complete src/CompletionInferValues.res 158:105 posCursor:[158:105] posNoWhite:[158:104] Found expr:[158:18->158:110] Pexp_apply ...[158:18->158:49] (~prepare158:51->158:58=...[158:59->158:72], ~render158:74->158:80=...[158:81->158:106], ...[158:107->158:109]) posCursor:[158:105] posNoWhite:[158:104] Found expr:[158:81->158:106] -posCursor:[158:105] posNoWhite:[158:104] Found expr:[158:82->158:106] posCursor:[158:105] posNoWhite:[158:104] Found expr:[158:97->158:105] Pexp_field [158:97->158:104] _:[158:105->158:105] Completable: Cpath Value[support]."" @@ -857,7 +845,6 @@ Complete src/CompletionInferValues.res 162:110 posCursor:[162:110] posNoWhite:[162:109] Found expr:[162:18->162:115] Pexp_apply ...[162:18->162:49] (~prepare162:51->162:58=...[162:59->162:72], ~render162:74->162:80=...[162:81->162:111], ...[162:112->162:114]) posCursor:[162:110] posNoWhite:[162:109] Found expr:[162:81->162:111] -posCursor:[162:110] posNoWhite:[162:109] Found expr:[162:82->162:111] posCursor:[162:110] posNoWhite:[162:109] Found expr:[162:104->0:-1] posCursor:[162:110] posNoWhite:[162:109] Found expr:[162:104->0:-1] Completable: Cpath Value[root]-> diff --git a/analysis/tests/src/expected/CompletionJsx.res.txt b/analysis/tests/src/expected/CompletionJsx.res.txt index 3d239e202..fba67fac1 100644 --- a/analysis/tests/src/expected/CompletionJsx.res.txt +++ b/analysis/tests/src/expected/CompletionJsx.res.txt @@ -24,7 +24,6 @@ Path Js.String2.st Complete src/CompletionJsx.res 13:21 posCursor:[13:21] posNoWhite:[13:20] Found expr:[8:13->33:3] -posCursor:[13:21] posNoWhite:[13:20] Found expr:[8:14->33:3] posCursor:[13:21] posNoWhite:[13:20] Found expr:[9:4->32:10] posCursor:[13:21] posNoWhite:[13:20] Found expr:[10:4->32:10] posCursor:[13:21] posNoWhite:[13:20] Found expr:[11:4->32:10] @@ -63,7 +62,6 @@ Path Js.String2.st Complete src/CompletionJsx.res 18:24 posCursor:[18:24] posNoWhite:[18:23] Found expr:[8:13->33:3] -posCursor:[18:24] posNoWhite:[18:23] Found expr:[8:14->33:3] posCursor:[18:24] posNoWhite:[18:23] Found expr:[9:4->32:10] posCursor:[18:24] posNoWhite:[18:23] Found expr:[10:4->32:10] posCursor:[18:24] posNoWhite:[18:23] Found expr:[11:4->32:10] @@ -112,7 +110,6 @@ Path Js.String2.st Complete src/CompletionJsx.res 20:27 posCursor:[20:27] posNoWhite:[20:26] Found expr:[8:13->33:3] -posCursor:[20:27] posNoWhite:[20:26] Found expr:[8:14->33:3] posCursor:[20:27] posNoWhite:[20:26] Found expr:[9:4->32:10] posCursor:[20:27] posNoWhite:[20:26] Found expr:[10:4->32:10] posCursor:[20:27] posNoWhite:[20:26] Found expr:[11:4->32:10] @@ -160,7 +157,6 @@ Path Js.String2.st Complete src/CompletionJsx.res 22:44 posCursor:[22:44] posNoWhite:[22:43] Found expr:[8:13->33:3] -posCursor:[22:44] posNoWhite:[22:43] Found expr:[8:14->33:3] posCursor:[22:44] posNoWhite:[22:43] Found expr:[9:4->32:10] posCursor:[22:44] posNoWhite:[22:43] Found expr:[10:4->32:10] posCursor:[22:44] posNoWhite:[22:43] Found expr:[11:4->32:10] @@ -210,7 +206,6 @@ Path Js.String2.st Complete src/CompletionJsx.res 24:19 posCursor:[24:19] posNoWhite:[24:18] Found expr:[8:13->33:3] -posCursor:[24:19] posNoWhite:[24:18] Found expr:[8:14->33:3] posCursor:[24:19] posNoWhite:[24:18] Found expr:[9:4->32:10] posCursor:[24:19] posNoWhite:[24:18] Found expr:[10:4->32:10] posCursor:[24:19] posNoWhite:[24:18] Found expr:[11:4->32:10] @@ -295,7 +290,6 @@ Path Belt.Int. Complete src/CompletionJsx.res 26:14 posCursor:[26:14] posNoWhite:[26:13] Found expr:[8:13->33:3] -posCursor:[26:14] posNoWhite:[26:13] Found expr:[8:14->33:3] posCursor:[26:14] posNoWhite:[26:13] Found expr:[9:4->32:10] posCursor:[26:14] posNoWhite:[26:13] Found expr:[10:4->32:10] posCursor:[26:14] posNoWhite:[26:13] Found expr:[11:4->32:10] @@ -379,7 +373,6 @@ Path Belt.Int. Complete src/CompletionJsx.res 28:20 posCursor:[28:20] posNoWhite:[28:19] Found expr:[8:13->33:3] -posCursor:[28:20] posNoWhite:[28:19] Found expr:[8:14->33:3] posCursor:[28:20] posNoWhite:[28:19] Found expr:[9:4->32:10] posCursor:[28:20] posNoWhite:[28:19] Found expr:[10:4->32:10] posCursor:[28:20] posNoWhite:[28:19] Found expr:[11:4->32:10] @@ -422,7 +415,6 @@ Path Js.Array2.a Complete src/CompletionJsx.res 30:12 posCursor:[30:12] posNoWhite:[30:11] Found expr:[8:13->33:3] -posCursor:[30:12] posNoWhite:[30:11] Found expr:[8:14->33:3] posCursor:[30:12] posNoWhite:[30:11] Found expr:[9:4->32:10] posCursor:[30:12] posNoWhite:[30:11] Found expr:[10:4->32:10] posCursor:[30:12] posNoWhite:[30:11] Found expr:[11:4->32:10] diff --git a/analysis/tests/src/expected/CompletionJsxProps.res.txt b/analysis/tests/src/expected/CompletionJsxProps.res.txt index 798028483..43a91f799 100644 --- a/analysis/tests/src/expected/CompletionJsxProps.res.txt +++ b/analysis/tests/src/expected/CompletionJsxProps.res.txt @@ -166,7 +166,7 @@ Package opens Pervasives.JsxModules.place holder Resolved opens 1 pervasives ContextPath CJsxPropValue [div] muted Path ReactDOM.domProps -Path PervasivesU.JsxDOM.domProps +Path Pervasives.JsxDOM.domProps [{ "label": "true", "kind": 4, @@ -189,12 +189,12 @@ Package opens Pervasives.JsxModules.place holder Resolved opens 1 pervasives ContextPath CJsxPropValue [div] onMouseEnter Path ReactDOM.domProps -Path PervasivesU.JsxDOM.domProps +Path Pervasives.JsxDOM.domProps [{ "label": "event => {}", "kind": 12, "tags": [], - "detail": "JsxEventU.Mouse.t => unit", + "detail": "JsxEventC.Mouse.t => unit", "documentation": null, "sortText": "A", "insertText": "{${1:event} => {$0}}", diff --git a/analysis/tests/src/expected/CompletionPipeChain.res.txt b/analysis/tests/src/expected/CompletionPipeChain.res.txt index f17db8b79..52bfb0631 100644 --- a/analysis/tests/src/expected/CompletionPipeChain.res.txt +++ b/analysis/tests/src/expected/CompletionPipeChain.res.txt @@ -440,7 +440,6 @@ Complete src/CompletionPipeChain.res 82:30 posCursor:[82:30] posNoWhite:[82:29] Found expr:[76:15->93:1] Pexp_apply ...[76:15->76:46] (~prepare77:3->77:10=...[77:11->77:24], ~render78:3->78:9=...[78:10->91:3], ...[92:2->92:4]) posCursor:[82:30] posNoWhite:[82:29] Found expr:[78:10->91:3] -posCursor:[82:30] posNoWhite:[82:29] Found expr:[78:10->91:3] posCursor:[82:30] posNoWhite:[82:29] Found expr:[79:4->90:14] posCursor:[82:30] posNoWhite:[82:29] Found expr:[82:7->90:14] posCursor:[82:30] posNoWhite:[82:29] Found expr:[82:7->82:30] @@ -468,7 +467,6 @@ Complete src/CompletionPipeChain.res 88:16 posCursor:[88:16] posNoWhite:[88:15] Found expr:[76:15->93:1] Pexp_apply ...[76:15->76:46] (~prepare77:3->77:10=...[77:11->77:24], ~render78:3->78:9=...[78:10->91:3], ...[92:2->92:4]) posCursor:[88:16] posNoWhite:[88:15] Found expr:[78:10->91:3] -posCursor:[88:16] posNoWhite:[88:15] Found expr:[78:10->91:3] posCursor:[88:16] posNoWhite:[88:15] Found expr:[79:4->90:14] posCursor:[88:16] posNoWhite:[88:15] Found expr:[84:4->90:14] posCursor:[88:16] posNoWhite:[88:15] Found expr:[85:4->90:14] diff --git a/analysis/tests/src/expected/Definition.res.txt b/analysis/tests/src/expected/Definition.res.txt index d315b708c..b42683cae 100644 --- a/analysis/tests/src/expected/Definition.res.txt +++ b/analysis/tests/src/expected/Definition.res.txt @@ -11,7 +11,7 @@ Hover src/Definition.res 18:14 {"contents": {"kind": "markdown", "value": "```rescript\n(Belt.List.t<'a>, 'a => 'b) => Belt.List.t<'b>\n```\n\n---\n\n```\n \n```\n```rescript\ntype Belt.List.t<'a> = list<'a>\n```\nGo to: [Type definition](command:rescript-vscode.go_to_location?%5B%22belt_List.resi%22%2C35%2C0%5D)\n\n\n\n Returns a new list with `f` applied to each element of `someList`.\n\n ```res example\n list{1, 2}->Belt.List.map(x => x + 1) // list{3, 4}\n ```\n"}} Hover src/Definition.res 23:3 -{"contents": {"kind": "markdown", "value": "```rescript\n(int, int) => int\n```"}} +{"contents": {"kind": "markdown", "value": "```rescript\n(. int, int) => int\n```"}} Definition src/Definition.res 26:3 {"uri": "Definition.res", "range": {"start": {"line": 21, "character": 4}, "end": {"line": 21, "character": 13}}} diff --git a/analysis/tests/src/expected/Destructuring.res.txt b/analysis/tests/src/expected/Destructuring.res.txt index c85f233a6..978a78816 100644 --- a/analysis/tests/src/expected/Destructuring.res.txt +++ b/analysis/tests/src/expected/Destructuring.res.txt @@ -36,7 +36,6 @@ Path x Complete src/Destructuring.res 11:13 posCursor:[11:13] posNoWhite:[11:11] Found expr:[10:8->14:1] -posCursor:[11:13] posNoWhite:[11:11] Found expr:[10:9->14:1] posCursor:[11:13] posNoWhite:[11:11] Found expr:[11:2->13:6] posCursor:[11:13] posNoWhite:[11:11] Found pattern:[11:6->11:14] Completable: Cpattern Value[x]->recordBody @@ -54,7 +53,6 @@ Path x Complete src/Destructuring.res 17:10 posCursor:[17:10] posNoWhite:[17:9] Found expr:[16:9->20:1] -posCursor:[17:10] posNoWhite:[17:9] Found expr:[16:10->20:1] posCursor:[17:10] posNoWhite:[17:9] Found expr:[17:5->19:11] posCursor:[17:10] posNoWhite:[17:9] Found pattern:[17:9->17:11] Completable: Cpattern Value[x]->recordBody diff --git a/analysis/tests/src/expected/Hover.res.txt b/analysis/tests/src/expected/Hover.res.txt index e80f641da..e56cbe0f2 100644 --- a/analysis/tests/src/expected/Hover.res.txt +++ b/analysis/tests/src/expected/Hover.res.txt @@ -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\nunit => 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```"}} +{"contents": {"kind": "markdown", "value": "```rescript\n(. unit, unit) => int\n```"}} Hover src/Hover.res 137:5 -{"contents": {"kind": "markdown", "value": "```rescript\nunit => 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"}} diff --git a/analysis/tests/src/expected/SignatureHelp.res.txt b/analysis/tests/src/expected/SignatureHelp.res.txt index 2a7811df6..2dd482881 100644 --- a/analysis/tests/src/expected/SignatureHelp.res.txt +++ b/analysis/tests/src/expected/SignatureHelp.res.txt @@ -10,11 +10,12 @@ ContextPath Value[someFunc] Path someFunc argAtCursor: unlabelled<0> extracted params: -[int, ~two: string=?, ~three: unit => unit, ~four: someVariant, unit] +[( + 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": [4, 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": "```rescript\nunit => unit\n```"}}, {"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```"}}], + "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```"}}], "documentation": {"kind": "markdown", "value": " Does stuff. "} }], "activeSignature": 0, @@ -33,11 +34,12 @@ ContextPath Value[someFunc] Path someFunc argAtCursor: unlabelled<0> extracted params: -[int, ~two: string=?, ~three: unit => unit, ~four: someVariant, unit] +[( + 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": [4, 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": "```rescript\nunit => unit\n```"}}, {"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```"}}], + "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```"}}], "documentation": {"kind": "markdown", "value": " Does stuff. "} }], "activeSignature": 0, @@ -56,11 +58,12 @@ ContextPath Value[someFunc] Path someFunc argAtCursor: ~two extracted params: -[int, ~two: string=?, ~three: unit => unit, ~four: someVariant, unit] +[( + 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": [4, 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": "```rescript\nunit => unit\n```"}}, {"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```"}}], + "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```"}}], "documentation": {"kind": "markdown", "value": " Does stuff. "} }], "activeSignature": 0, @@ -79,11 +82,12 @@ ContextPath Value[someFunc] Path someFunc argAtCursor: ~two extracted params: -[int, ~two: string=?, ~three: unit => unit, ~four: someVariant, unit] +[( + 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": [4, 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": "```rescript\nunit => unit\n```"}}, {"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```"}}], + "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```"}}], "documentation": {"kind": "markdown", "value": " Does stuff. "} }], "activeSignature": 0, @@ -102,11 +106,12 @@ ContextPath Value[someFunc] Path someFunc argAtCursor: ~four extracted params: -[int, ~two: string=?, ~three: unit => unit, ~four: someVariant, unit] +[( + 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": [4, 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": "```rescript\nunit => unit\n```"}}, {"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```"}}], + "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```"}}], "documentation": {"kind": "markdown", "value": " Does stuff. "} }], "activeSignature": 0, @@ -125,11 +130,12 @@ ContextPath Value[someFunc] Path someFunc argAtCursor: ~four extracted params: -[int, ~two: string=?, ~three: unit => unit, ~four: someVariant, unit] +[( + 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": [4, 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": "```rescript\nunit => unit\n```"}}, {"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```"}}], + "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```"}}], "documentation": {"kind": "markdown", "value": " Does stuff. "} }], "activeSignature": 0, @@ -148,11 +154,11 @@ ContextPath Value[otherFunc] Path otherFunc argAtCursor: unlabelled<0> extracted params: -[string, int, float] +[(string, int, float] { "signatures": [{ "label": "(string, int, float) => unit", - "parameters": [{"label": [1, 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```"}}] + "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```"}}] }], "activeSignature": 0, "activeParameter": 0 @@ -170,11 +176,11 @@ ContextPath Value[otherFunc] Path otherFunc argAtCursor: unlabelled<0> extracted params: -[string, int, float] +[(string, int, float] { "signatures": [{ "label": "(string, int, float) => unit", - "parameters": [{"label": [1, 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```"}}] + "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```"}}] }], "activeSignature": 0, "activeParameter": 0 @@ -192,11 +198,11 @@ ContextPath Value[otherFunc] Path otherFunc argAtCursor: unlabelled<2> extracted params: -[string, int, float] +[(string, int, float] { "signatures": [{ "label": "(string, int, float) => unit", - "parameters": [{"label": [1, 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```"}}] + "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```"}}] }], "activeSignature": 0, "activeParameter": 2 @@ -214,11 +220,11 @@ ContextPath Value[Completion, Lib, foo] Path Completion.Lib.foo argAtCursor: ~age extracted params: -[~age: int, ~name: string] +[(~age: int, ~name: string] { "signatures": [{ "label": "(~age: int, ~name: string) => string", - "parameters": [{"label": [1, 10], "documentation": {"kind": "markdown", "value": "```rescript\nint\n```"}}, {"label": [12, 25], "documentation": {"kind": "markdown", "value": "```rescript\nstring\n```"}}] + "parameters": [{"label": [0, 10], "documentation": {"kind": "markdown", "value": "```rescript\nint\n```"}}, {"label": [12, 25], "documentation": {"kind": "markdown", "value": "```rescript\nstring\n```"}}] }], "activeSignature": 0, "activeParameter": 0 @@ -259,11 +265,11 @@ ContextPath Value[otherFunc] Path otherFunc argAtCursor: unlabelled<1> extracted params: -[string, int, float] +[(string, int, float] { "signatures": [{ "label": "(string, int, float) => unit", - "parameters": [{"label": [1, 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```"}}] + "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```"}}] }], "activeSignature": 0, "activeParameter": 1 @@ -281,11 +287,11 @@ ContextPath Value[fn] Path fn argAtCursor: unlabelled<1> extracted params: -[int, string, int] +[(int, string, int] { "signatures": [{ "label": "(int, string, int) => unit", - "parameters": [{"label": [1, 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```"}}] + "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```"}}] }], "activeSignature": 0, "activeParameter": 1 @@ -303,11 +309,11 @@ ContextPath Value[fn] Path fn argAtCursor: unlabelled<1> extracted params: -[int, string, int] +[(int, string, int] { "signatures": [{ "label": "(int, string, int) => unit", - "parameters": [{"label": [1, 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```"}}] + "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```"}}] }], "activeSignature": 0, "activeParameter": 1 @@ -325,11 +331,11 @@ ContextPath Value[fn] Path fn argAtCursor: unlabelled<2> extracted params: -[int, string, int] +[(int, string, int] { "signatures": [{ "label": "(int, string, int) => unit", - "parameters": [{"label": [1, 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```"}}] + "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```"}}] }], "activeSignature": 0, "activeParameter": 2 @@ -375,11 +381,12 @@ ContextPath Value[someFunc] Path someFunc argAtCursor: unlabelled<0> extracted params: -[int, ~two: string=?, ~three: unit => unit, ~four: someVariant, unit] +[( + 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": [4, 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": "```rescript\nunit => unit\n```"}}, {"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```"}}], + "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```"}}], "documentation": {"kind": "markdown", "value": " Does stuff. "} }], "activeSignature": 0, From f34190cbda5d47247581031fa6c1aade0a24ad66 Mon Sep 17 00:00:00 2001 From: Gabriel Nordeborn Date: Thu, 17 Aug 2023 18:25:13 +0200 Subject: [PATCH 07/11] changelog --- CHANGELOG.md | 1 + 1 file changed, 1 insertion(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 7fd917d7b..93c9d8ba1 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -30,6 +30,7 @@ - Fix accidental output of extra `|` when producing exhaustive switch code for polyvariants. https://github.com/rescript-lang/rescript-vscode/pull/805 - Fix JS syntax highlighting in single-line FFI extension points. https://github.com/rescript-lang/rescript-vscode/pull/807 - Fix signature help in uncurried mode. https://github.com/rescript-lang/rescript-vscode/pull/809 +- Fix various issues in uncurried mode. https://github.com/rescript-lang/rescript-vscode/pull/810 ## 1.18.0 From a0b9ad4872b43c3261a310256c5ded833bb51b87 Mon Sep 17 00:00:00 2001 From: Gabriel Nordeborn Date: Thu, 17 Aug 2023 19:18:41 +0200 Subject: [PATCH 08/11] revert compiler upgrade --- analysis/tests/bsconfig.json | 1 - analysis/tests/package-lock.json | 2 +- analysis/tests/package.json | 2 +- 3 files changed, 2 insertions(+), 3 deletions(-) diff --git a/analysis/tests/bsconfig.json b/analysis/tests/bsconfig.json index 14f838fdd..a1380ab94 100644 --- a/analysis/tests/bsconfig.json +++ b/analysis/tests/bsconfig.json @@ -1,5 +1,4 @@ { - "uncurried": false, "name": "test", "reanalyze": { "analysis": ["dce"] diff --git a/analysis/tests/package-lock.json b/analysis/tests/package-lock.json index 7b85d6958..4f889485f 100644 --- a/analysis/tests/package-lock.json +++ b/analysis/tests/package-lock.json @@ -8,7 +8,7 @@ "rescript": "^11.0.0-rc.1" }, "devDependencies": { - "@rescript/react": "^0.11.0-rc.3" + "@rescript/react": "^0.11.0-alpha.1" } }, "node_modules/@rescript/react": { diff --git a/analysis/tests/package.json b/analysis/tests/package.json index 18b1ff7ed..7ee199d1a 100644 --- a/analysis/tests/package.json +++ b/analysis/tests/package.json @@ -5,7 +5,7 @@ }, "private": true, "devDependencies": { - "@rescript/react": "^0.11.0-rc.3" + "@rescript/react": "^0.11.0-alpha.1" }, "dependencies": { "rescript": "^11.0.0-rc.1" From 3fcf16a8fe4651ec33cde5f0396e4436f7945c50 Mon Sep 17 00:00:00 2001 From: Gabriel Nordeborn Date: Thu, 17 Aug 2023 21:19:09 +0200 Subject: [PATCH 09/11] revert to unchanged test content --- 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 | 52 ++++---- .../expected/CompletionExpressions.res.txt | 48 ++++---- .../CompletionFunctionArguments.res.txt | 4 +- .../expected/CompletionInferValues.res.txt | 38 +++--- .../src/expected/CompletionJsxProps.res.txt | 10 +- .../src/expected/CompletionPipeChain.res.txt | 78 ++++++------ .../expected/CompletionTypeAnnotation.res.txt | 4 +- .../src/expected/CreateInterface.res.txt | 2 +- analysis/tests/src/expected/Div.res.txt | 2 +- .../ExhaustiveSwitchCodeAction.res.txt | 2 + analysis/tests/src/expected/Hover.res.txt | 22 ++-- .../tests/src/expected/RecModules.res.txt | 4 +- .../tests/src/expected/SignatureHelp.res.txt | 116 +++++++++--------- 16 files changed, 195 insertions(+), 199 deletions(-) create mode 100644 analysis/tests/src/expected/ExhaustiveSwitchCodeAction.res.txt 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 db7e4d240..7bbd0c4ff 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,7 +382,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 [{ "label": "age", "kind": 4, @@ -479,13 +479,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 }] @@ -579,7 +579,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 [{ "label": "age", "kind": 4, @@ -596,7 +596,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 [{ "label": "name", "kind": 4, @@ -613,7 +613,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 [{ "label": "name", "kind": 4, @@ -630,7 +630,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 +777,7 @@ Path my "label": "myAmazingFunction", "kind": 12, "tags": [], - "detail": "(int, int) => int", + "detail": "(. int, int) => int", "documentation": null }] @@ -1103,13 +1103,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 +1127,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,7 +1335,7 @@ Resolved opens 3 Completion.res Completion.res pervasives ContextPath Value[funRecord].someFun ContextPath Value[funRecord] Path funRecord -Found type for function (~name: string) => unit +Found type for function (. ~name: string) => unit [{ "label": "name", "kind": 4, @@ -1572,7 +1572,7 @@ 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 +Found type for function (. ~b: int) => callback [{ "label": "b", "kind": 4, @@ -1597,14 +1597,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 +1707,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, @@ -1814,13 +1808,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 }] @@ -1870,13 +1864,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 }] @@ -1973,7 +1967,7 @@ Path r "label": "retAA", "kind": 12, "tags": [], - "detail": "unit => aa", + "detail": "(. unit) => aa", "documentation": null }, { "label": "r", diff --git a/analysis/tests/src/expected/CompletionExpressions.res.txt b/analysis/tests/src/expected/CompletionExpressions.res.txt index 2be6098fd..ebcecbab6 100644 --- a/analysis/tests/src/expected/CompletionExpressions.res.txt +++ b/analysis/tests/src/expected/CompletionExpressions.res.txt @@ -777,13 +777,13 @@ ContextPath CArgument Value[fnTakingCallback]($0) ContextPath Value[fnTakingCallback] Path fnTakingCallback [{ - "label": "() => {}", + "label": "(. ) => {}", "kind": 12, "tags": [], "detail": "unit => unit", "documentation": null, "sortText": "A", - "insertText": "() => {$0}", + "insertText": "(. ) => {$0}", "insertTextFormat": 2 }] @@ -808,13 +808,13 @@ ContextPath CArgument Value[fnTakingCallback]($1) ContextPath Value[fnTakingCallback] Path fnTakingCallback [{ - "label": "v => {}", + "label": "(. v) => {}", "kind": 12, "tags": [], "detail": "bool => unit", "documentation": null, "sortText": "A", - "insertText": "${1:v} => {$0}", + "insertText": "(. ${1:v}) => {$0}", "insertTextFormat": 2 }] @@ -828,13 +828,13 @@ ContextPath CArgument Value[fnTakingCallback]($2) ContextPath Value[fnTakingCallback] Path fnTakingCallback [{ - "label": "event => {}", + "label": "(. event) => {}", "kind": 12, "tags": [], "detail": "ReactEvent.Mouse.t => unit", "documentation": null, "sortText": "A", - "insertText": "${1:event} => {$0}", + "insertText": "(. ${1:event}) => {$0}", "insertTextFormat": 2 }] @@ -848,13 +848,13 @@ ContextPath CArgument Value[fnTakingCallback]($3) ContextPath Value[fnTakingCallback] Path fnTakingCallback [{ - "label": "(~on, ~off=?, variant) => {}", + "label": "(. => {}", "kind": 12, "tags": [], "detail": "(~on: bool, ~off: bool=?, variant) => int", "documentation": null, "sortText": "A", - "insertText": "(~on, ~off=?, ${1:variant}) => {$0}", + "insertText": "(. => {$0}", "insertTextFormat": 2 }] @@ -868,13 +868,13 @@ ContextPath CArgument Value[fnTakingCallback]($4) ContextPath Value[fnTakingCallback] Path fnTakingCallback [{ - "label": "(v1, v2, v3) => {}", + "label": "(. => {}", "kind": 12, "tags": [], "detail": "(bool, option, bool) => unit", "documentation": null, "sortText": "A", - "insertText": "(${1:v1}, ${2:v2}, ${3:v3}) => {$0}", + "insertText": "(. => {$0}", "insertTextFormat": 2 }] @@ -888,13 +888,13 @@ ContextPath CArgument Value[fnTakingCallback]($5) ContextPath Value[fnTakingCallback] Path fnTakingCallback [{ - "label": "(~on=?, ~off=?, ()) => {}", + "label": "(. => {}", "kind": 12, "tags": [], "detail": "(~on: bool=?, ~off: bool=?, unit) => int", "documentation": null, "sortText": "A", - "insertText": "(~on=?, ~off=?, ()) => {$0}", + "insertText": "(. => {$0}", "insertTextFormat": 2 }] @@ -964,13 +964,13 @@ ContextPath CArgument Value[takesCb]($0) ContextPath Value[takesCb] Path takesCb [{ - "label": "someTyp => {}", + "label": "(. someTyp) => {}", "kind": 12, "tags": [], "detail": "someTyp => 'a", "documentation": null, "sortText": "A", - "insertText": "${1:someTyp} => {$0}", + "insertText": "(. ${1:someTyp}) => {$0}", "insertTextFormat": 2 }] @@ -984,13 +984,13 @@ ContextPath CArgument Value[takesCb2]($0) ContextPath Value[takesCb2] Path takesCb2 [{ - "label": "environment => {}", + "label": "(. environment) => {}", "kind": 12, "tags": [], "detail": "Environment.t => 'a", "documentation": null, "sortText": "A", - "insertText": "${1:environment} => {$0}", + "insertText": "(. ${1:environment}) => {$0}", "insertTextFormat": 2 }] @@ -1004,13 +1004,13 @@ ContextPath CArgument Value[takesCb3]($0) ContextPath Value[takesCb3] Path takesCb3 [{ - "label": "apiCallResult => {}", + "label": "(. apiCallResult) => {}", "kind": 12, "tags": [], "detail": "apiCallResult => 'a", "documentation": null, "sortText": "A", - "insertText": "${1:apiCallResult} => {$0}", + "insertText": "(. ${1:apiCallResult}) => {$0}", "insertTextFormat": 2 }] @@ -1024,13 +1024,13 @@ ContextPath CArgument Value[takesCb4]($0) ContextPath Value[takesCb4] Path takesCb4 [{ - "label": "apiCallResult => {}", + "label": "(. apiCallResult) => {}", "kind": 12, "tags": [], "detail": "option => 'a", "documentation": null, "sortText": "A", - "insertText": "${1:apiCallResult} => {$0}", + "insertText": "(. ${1:apiCallResult}) => {$0}", "insertTextFormat": 2 }] @@ -1044,13 +1044,13 @@ ContextPath CArgument Value[takesCb5]($0) ContextPath Value[takesCb5] Path takesCb5 [{ - "label": "apiCallResults => {}", + "label": "(. apiCallResults) => {}", "kind": 12, "tags": [], "detail": "array> => 'a", "documentation": null, "sortText": "A", - "insertText": "${1:apiCallResults} => {$0}", + "insertText": "(. ${1:apiCallResults}) => {$0}", "insertTextFormat": 2 }] @@ -1064,13 +1064,13 @@ ContextPath CArgument Value[commitLocalUpdate](~updater) ContextPath Value[commitLocalUpdate] Path commitLocalUpdate [{ - "label": "recordSourceSelectorProxy => {}", + "label": "(. recordSourceSelectorProxy) => {}", "kind": 12, "tags": [], "detail": "RecordSourceSelectorProxy.t => unit", "documentation": null, "sortText": "A", - "insertText": "${1:recordSourceSelectorProxy} => {$0}", + "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..d5b79a564 100644 --- a/analysis/tests/src/expected/CompletionFunctionArguments.res.txt +++ b/analysis/tests/src/expected/CompletionFunctionArguments.res.txt @@ -387,7 +387,7 @@ Path ReactEvent.Mouse.a "label": "ReactEvent.Mouse.altKey", "kind": 12, "tags": [], - "detail": "t => bool", + "detail": "(. t) => bool", "documentation": null }] @@ -412,7 +412,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 a47abf607..d52c173e5 100644 --- a/analysis/tests/src/expected/CompletionInferValues.res.txt +++ b/analysis/tests/src/expected/CompletionInferValues.res.txt @@ -168,7 +168,7 @@ Path ReactEvent.Mouse.pr "label": "ReactEvent.Mouse.preventDefault", "kind": 12, "tags": [], - "detail": "t => unit", + "detail": "(. t) => unit", "documentation": null }] @@ -186,16 +186,16 @@ Path event ContextPath CArgument CJsxPropValue [div] onMouseEnter($0) ContextPath CJsxPropValue [div] onMouseEnter Path ReactDOM.domProps -Path Pervasives.JsxDOM.domProps +Path PervasivesU.JsxDOM.domProps CPPipe env:CompletionInferValues -CPPipe type path:JsxEventC.Mouse.t -CPPipe pathFromEnv:JsxEventC.Mouse found:false -Path JsxEventC.Mouse.pr +CPPipe type path:JsxEventU.Mouse.t +CPPipe pathFromEnv:JsxEventU.Mouse found:false +Path JsxEventU.Mouse.pr [{ - "label": "JsxEventC.Mouse.preventDefault", + "label": "JsxEventU.Mouse.preventDefault", "kind": 12, "tags": [], - "detail": "t => unit", + "detail": "(. t) => unit", "documentation": null }] @@ -214,14 +214,14 @@ 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 +CPPipe type path:PervasivesU.JsxEvent.Mouse.t +CPPipe pathFromEnv:PervasivesU.JsxEvent.Mouse found:false +Path PervasivesU.JsxEvent.Mouse.pr [{ - "label": "Pervasives.JsxEvent.Mouse.preventDefault", + "label": "PervasivesU.JsxEvent.Mouse.preventDefault", "kind": 12, "tags": [], - "detail": "t => unit", + "detail": "(. t) => unit", "documentation": null }] @@ -727,13 +727,13 @@ Path ReactDOM.Client.Root. "label": "ReactDOM.Client.Root.unmount", "kind": 12, "tags": [], - "detail": "(t, unit) => unit", + "detail": "(. t, unit) => unit", "documentation": null }, { "label": "ReactDOM.Client.Root.render", "kind": 12, "tags": [], - "detail": "(t, React.element) => unit", + "detail": "(. t, React.element) => unit", "documentation": null }] @@ -762,19 +762,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 }] @@ -866,13 +866,13 @@ Path ReactDOM.Client.Root. "label": "ReactDOM.Client.Root.unmount", "kind": 12, "tags": [], - "detail": "(t, unit) => unit", + "detail": "(. t, unit) => unit", "documentation": null }, { "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/CompletionJsxProps.res.txt b/analysis/tests/src/expected/CompletionJsxProps.res.txt index 43a91f799..55b9c0802 100644 --- a/analysis/tests/src/expected/CompletionJsxProps.res.txt +++ b/analysis/tests/src/expected/CompletionJsxProps.res.txt @@ -166,7 +166,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, @@ -189,15 +189,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 }] 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..d48442879 100644 --- a/analysis/tests/src/expected/CreateInterface.res.txt +++ b/analysis/tests/src/expected/CreateInterface.res.txt @@ -1,6 +1,6 @@ Create Interface src/CreateInterface.res type r = {name: string, age: int} -let add: (~x: int, ~y: int) => int +let add: (. ~x: int, ~y: int) => int @react.component let make: (~name: string) => React.element module Other: { diff --git a/analysis/tests/src/expected/Div.res.txt b/analysis/tests/src/expected/Div.res.txt index 29048516a..b1f0e98ed 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 = 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/ExhaustiveSwitchCodeAction.res.txt b/analysis/tests/src/expected/ExhaustiveSwitchCodeAction.res.txt new file mode 100644 index 000000000..e49ca92c1 --- /dev/null +++ b/analysis/tests/src/expected/ExhaustiveSwitchCodeAction.res.txt @@ -0,0 +1,2 @@ +Xform src/ExhaustiveSwitchCodeAction.res 10:15 + diff --git a/analysis/tests/src/expected/Hover.res.txt b/analysis/tests/src/expected/Hover.res.txt index e56cbe0f2..7397b61b8 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 = 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/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..3a7f24fc8 100644 --- a/analysis/tests/src/expected/SignatureHelp.res.txt +++ b/analysis/tests/src/expected/SignatureHelp.res.txt @@ -10,12 +10,12 @@ ContextPath Value[someFunc] Path someFunc argAtCursor: unlabelled<0> extracted params: -[( - int, ~two: string=?, ~three: unit => unit, ~four: someVariant, unit] +[. + 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": [{"label": [1, 8], "documentation": {"kind": "markdown", "value": "```rescript\nint\n```"}}, {"label": [12, 26], "documentation": {"kind": "markdown", "value": "```rescript\noption\n```"}}, {"label": [30, 54], "documentation": {"kind": "markdown", "value": "```rescript\n(. unit) => unit\n```"}}, {"label": [58, 76], "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": [80, 84], "documentation": {"kind": "markdown", "value": "```rescript\nint\n```"}}], "documentation": {"kind": "markdown", "value": " Does stuff. "} }], "activeSignature": 0, @@ -34,12 +34,12 @@ ContextPath Value[someFunc] Path someFunc argAtCursor: unlabelled<0> extracted params: -[( - int, ~two: string=?, ~three: unit => unit, ~four: someVariant, unit] +[. + 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": [{"label": [1, 8], "documentation": {"kind": "markdown", "value": "```rescript\nint\n```"}}, {"label": [12, 26], "documentation": {"kind": "markdown", "value": "```rescript\noption\n```"}}, {"label": [30, 54], "documentation": {"kind": "markdown", "value": "```rescript\n(. unit) => unit\n```"}}, {"label": [58, 76], "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": [80, 84], "documentation": {"kind": "markdown", "value": "```rescript\nint\n```"}}], "documentation": {"kind": "markdown", "value": " Does stuff. "} }], "activeSignature": 0, @@ -58,12 +58,12 @@ ContextPath Value[someFunc] Path someFunc argAtCursor: ~two extracted params: -[( - int, ~two: string=?, ~three: unit => unit, ~four: someVariant, unit] +[. + 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": [{"label": [1, 8], "documentation": {"kind": "markdown", "value": "```rescript\nint\n```"}}, {"label": [12, 26], "documentation": {"kind": "markdown", "value": "```rescript\noption\n```"}}, {"label": [30, 54], "documentation": {"kind": "markdown", "value": "```rescript\n(. unit) => unit\n```"}}, {"label": [58, 76], "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": [80, 84], "documentation": {"kind": "markdown", "value": "```rescript\nint\n```"}}], "documentation": {"kind": "markdown", "value": " Does stuff. "} }], "activeSignature": 0, @@ -82,12 +82,12 @@ ContextPath Value[someFunc] Path someFunc argAtCursor: ~two extracted params: -[( - int, ~two: string=?, ~three: unit => unit, ~four: someVariant, unit] +[. + 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": [{"label": [1, 8], "documentation": {"kind": "markdown", "value": "```rescript\nint\n```"}}, {"label": [12, 26], "documentation": {"kind": "markdown", "value": "```rescript\noption\n```"}}, {"label": [30, 54], "documentation": {"kind": "markdown", "value": "```rescript\n(. unit) => unit\n```"}}, {"label": [58, 76], "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": [80, 84], "documentation": {"kind": "markdown", "value": "```rescript\nint\n```"}}], "documentation": {"kind": "markdown", "value": " Does stuff. "} }], "activeSignature": 0, @@ -106,12 +106,12 @@ ContextPath Value[someFunc] Path someFunc argAtCursor: ~four extracted params: -[( - int, ~two: string=?, ~three: unit => unit, ~four: someVariant, unit] +[. + 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": [{"label": [1, 8], "documentation": {"kind": "markdown", "value": "```rescript\nint\n```"}}, {"label": [12, 26], "documentation": {"kind": "markdown", "value": "```rescript\noption\n```"}}, {"label": [30, 54], "documentation": {"kind": "markdown", "value": "```rescript\n(. unit) => unit\n```"}}, {"label": [58, 76], "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": [80, 84], "documentation": {"kind": "markdown", "value": "```rescript\nint\n```"}}], "documentation": {"kind": "markdown", "value": " Does stuff. "} }], "activeSignature": 0, @@ -130,12 +130,12 @@ ContextPath Value[someFunc] Path someFunc argAtCursor: ~four extracted params: -[( - int, ~two: string=?, ~three: unit => unit, ~four: someVariant, unit] +[. + 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": [{"label": [1, 8], "documentation": {"kind": "markdown", "value": "```rescript\nint\n```"}}, {"label": [12, 26], "documentation": {"kind": "markdown", "value": "```rescript\noption\n```"}}, {"label": [30, 54], "documentation": {"kind": "markdown", "value": "```rescript\n(. unit) => unit\n```"}}, {"label": [58, 76], "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": [80, 84], "documentation": {"kind": "markdown", "value": "```rescript\nint\n```"}}], "documentation": {"kind": "markdown", "value": " Does stuff. "} }], "activeSignature": 0, @@ -154,11 +154,11 @@ ContextPath Value[otherFunc] Path otherFunc argAtCursor: unlabelled<0> extracted params: -[(string, int, float] +[. 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": [{"label": [1, 9], "documentation": {"kind": "markdown", "value": "```rescript\nstring\n```"}}, {"label": [11, 14], "documentation": {"kind": "markdown", "value": "```rescript\nstring\n```"}}, {"label": [16, 21], "documentation": {"kind": "markdown", "value": "```rescript\nstring\n```"}}] }], "activeSignature": 0, "activeParameter": 0 @@ -176,11 +176,11 @@ ContextPath Value[otherFunc] Path otherFunc argAtCursor: unlabelled<0> extracted params: -[(string, int, float] +[. 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": [{"label": [1, 9], "documentation": {"kind": "markdown", "value": "```rescript\nstring\n```"}}, {"label": [11, 14], "documentation": {"kind": "markdown", "value": "```rescript\nstring\n```"}}, {"label": [16, 21], "documentation": {"kind": "markdown", "value": "```rescript\nstring\n```"}}] }], "activeSignature": 0, "activeParameter": 0 @@ -198,11 +198,11 @@ ContextPath Value[otherFunc] Path otherFunc argAtCursor: unlabelled<2> extracted params: -[(string, int, float] +[. 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": [{"label": [1, 9], "documentation": {"kind": "markdown", "value": "```rescript\nstring\n```"}}, {"label": [11, 14], "documentation": {"kind": "markdown", "value": "```rescript\nstring\n```"}}, {"label": [16, 21], "documentation": {"kind": "markdown", "value": "```rescript\nstring\n```"}}] }], "activeSignature": 0, "activeParameter": 2 @@ -220,11 +220,11 @@ ContextPath Value[Completion, Lib, foo] Path Completion.Lib.foo argAtCursor: ~age extracted params: -[(~age: int, ~name: string] +[. ~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": [{"label": [1, 12], "documentation": {"kind": "markdown", "value": "```rescript\nint\n```"}}, {"label": [14, 27], "documentation": {"kind": "markdown", "value": "```rescript\nstring\n```"}}] }], "activeSignature": 0, "activeParameter": 0 @@ -242,11 +242,11 @@ ContextPath Value[iAmSoSpecial] Path iAmSoSpecial argAtCursor: unlabelled<0> extracted params: -[string] +[. string] { "signatures": [{ - "label": "string => unit", - "parameters": [{"label": [0, 6], "documentation": {"kind": "markdown", "value": "```rescript\nstring\n```"}}] + "label": "(. string) => unit", + "parameters": [{"label": [1, 9], "documentation": {"kind": "markdown", "value": "```rescript\nstring\n```"}}] }], "activeSignature": 0, "activeParameter": 0 @@ -265,11 +265,11 @@ ContextPath Value[otherFunc] Path otherFunc argAtCursor: unlabelled<1> extracted params: -[(string, int, float] +[. 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": [{"label": [1, 9], "documentation": {"kind": "markdown", "value": "```rescript\nstring\n```"}}, {"label": [11, 14], "documentation": {"kind": "markdown", "value": "```rescript\nstring\n```"}}, {"label": [16, 21], "documentation": {"kind": "markdown", "value": "```rescript\nstring\n```"}}] }], "activeSignature": 0, "activeParameter": 1 @@ -287,11 +287,11 @@ ContextPath Value[fn] Path fn argAtCursor: unlabelled<1> extracted params: -[(int, string, int] +[. 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": [{"label": [1, 6], "documentation": {"kind": "markdown", "value": "```rescript\nint\n```"}}, {"label": [8, 14], "documentation": {"kind": "markdown", "value": "```rescript\nint\n```"}}, {"label": [16, 19], "documentation": {"kind": "markdown", "value": "```rescript\nint\n```"}}] }], "activeSignature": 0, "activeParameter": 1 @@ -309,11 +309,11 @@ ContextPath Value[fn] Path fn argAtCursor: unlabelled<1> extracted params: -[(int, string, int] +[. 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": [{"label": [1, 6], "documentation": {"kind": "markdown", "value": "```rescript\nint\n```"}}, {"label": [8, 14], "documentation": {"kind": "markdown", "value": "```rescript\nint\n```"}}, {"label": [16, 19], "documentation": {"kind": "markdown", "value": "```rescript\nint\n```"}}] }], "activeSignature": 0, "activeParameter": 1 @@ -331,11 +331,11 @@ ContextPath Value[fn] Path fn argAtCursor: unlabelled<2> extracted params: -[(int, string, int] +[. 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": [{"label": [1, 6], "documentation": {"kind": "markdown", "value": "```rescript\nint\n```"}}, {"label": [8, 14], "documentation": {"kind": "markdown", "value": "```rescript\nint\n```"}}, {"label": [16, 19], "documentation": {"kind": "markdown", "value": "```rescript\nint\n```"}}] }], "activeSignature": 0, "activeParameter": 2 @@ -355,11 +355,11 @@ ContextPath Value[iAmSoSpecial] Path iAmSoSpecial argAtCursor: unlabelled<0> extracted params: -[string] +[. string] { "signatures": [{ - "label": "string => unit", - "parameters": [{"label": [0, 6], "documentation": {"kind": "markdown", "value": "```rescript\nstring\n```"}}] + "label": "(. string) => unit", + "parameters": [{"label": [1, 9], "documentation": {"kind": "markdown", "value": "```rescript\nstring\n```"}}] }], "activeSignature": 0, "activeParameter": 0 @@ -381,12 +381,12 @@ ContextPath Value[someFunc] Path someFunc argAtCursor: unlabelled<0> extracted params: -[( - int, ~two: string=?, ~three: unit => unit, ~four: someVariant, unit] +[. + 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": [{"label": [1, 8], "documentation": {"kind": "markdown", "value": "```rescript\nint\n```"}}, {"label": [12, 26], "documentation": {"kind": "markdown", "value": "```rescript\noption\n```"}}, {"label": [30, 54], "documentation": {"kind": "markdown", "value": "```rescript\n(. unit) => unit\n```"}}, {"label": [58, 76], "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": [80, 84], "documentation": {"kind": "markdown", "value": "```rescript\nint\n```"}}], "documentation": {"kind": "markdown", "value": " Does stuff. "} }], "activeSignature": 0, From 8b12748e865b9da8d4035db2dbd630fe9ceac9e3 Mon Sep 17 00:00:00 2001 From: Gabriel Nordeborn Date: Thu, 17 Aug 2023 21:19:38 +0200 Subject: [PATCH 10/11] remove accidentally committed file --- analysis/tests/src/expected/ExhaustiveSwitchCodeAction.res.txt | 2 -- 1 file changed, 2 deletions(-) delete mode 100644 analysis/tests/src/expected/ExhaustiveSwitchCodeAction.res.txt diff --git a/analysis/tests/src/expected/ExhaustiveSwitchCodeAction.res.txt b/analysis/tests/src/expected/ExhaustiveSwitchCodeAction.res.txt deleted file mode 100644 index e49ca92c1..000000000 --- a/analysis/tests/src/expected/ExhaustiveSwitchCodeAction.res.txt +++ /dev/null @@ -1,2 +0,0 @@ -Xform src/ExhaustiveSwitchCodeAction.res 10:15 - From 86821093078150ae71b35b7a4a0a67c054ad536a Mon Sep 17 00:00:00 2001 From: Gabriel Nordeborn Date: Thu, 17 Aug 2023 21:23:13 +0200 Subject: [PATCH 11/11] gah --- analysis/tests/package-lock.json | 19 ++- analysis/tests/package.json | 4 +- analysis/tests/src/expected/Auto.res.txt | 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 | 74 ++++++----- .../expected/CompletionExpressions.res.txt | 48 ++++---- .../CompletionFunctionArguments.res.txt | 4 +- .../expected/CompletionInferValues.res.txt | 42 +++---- .../src/expected/CompletionJsxProps.res.txt | 10 +- .../src/expected/CompletionPipeChain.res.txt | 78 ++++++------ .../expected/CompletionTypeAnnotation.res.txt | 4 +- .../src/expected/CreateInterface.res.txt | 2 +- analysis/tests/src/expected/Debug.res.txt | 4 +- .../tests/src/expected/Definition.res.txt | 2 +- analysis/tests/src/expected/Div.res.txt | 2 +- analysis/tests/src/expected/Hover.res.txt | 22 ++-- .../tests/src/expected/RecModules.res.txt | 4 +- .../tests/src/expected/SignatureHelp.res.txt | 116 +++++++++--------- 20 files changed, 226 insertions(+), 223 deletions(-) diff --git a/analysis/tests/package-lock.json b/analysis/tests/package-lock.json index 4f889485f..946ef95e9 100644 --- a/analysis/tests/package-lock.json +++ b/analysis/tests/package-lock.json @@ -5,10 +5,10 @@ "packages": { "": { "dependencies": { - "rescript": "^11.0.0-rc.1" + "rescript": "11.0.0-alpha.1" }, "devDependencies": { - "@rescript/react": "^0.11.0-alpha.1" + "@rescript/react": "^0.11.0-rc.3" } }, "node_modules/@rescript/react": { @@ -69,17 +69,14 @@ } }, "node_modules/rescript": { - "version": "11.0.0-rc.1", - "resolved": "https://registry.npmjs.org/rescript/-/rescript-11.0.0-rc.1.tgz", - "integrity": "sha512-NSeq8cKlHRyjyVhanJYDHkTruYH51HDmlc7Eal7foT97wUj6rOzP6F+dnE2JrC59yV6Xejqjb6i73aXSdaK6OQ==", + "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==", "hasInstallScript": true, "bin": { "bsc": "bsc", "bstracing": "lib/bstracing", "rescript": "rescript" - }, - "engines": { - "node": ">=10" } }, "node_modules/scheduler": { @@ -140,9 +137,9 @@ } }, "rescript": { - "version": "11.0.0-rc.1", - "resolved": "https://registry.npmjs.org/rescript/-/rescript-11.0.0-rc.1.tgz", - "integrity": "sha512-NSeq8cKlHRyjyVhanJYDHkTruYH51HDmlc7Eal7foT97wUj6rOzP6F+dnE2JrC59yV6Xejqjb6i73aXSdaK6OQ==" + "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==" }, "scheduler": { "version": "0.23.0", diff --git a/analysis/tests/package.json b/analysis/tests/package.json index 7ee199d1a..c3ef1f6b9 100644 --- a/analysis/tests/package.json +++ b/analysis/tests/package.json @@ -5,9 +5,9 @@ }, "private": true, "devDependencies": { - "@rescript/react": "^0.11.0-alpha.1" + "@rescript/react": "^0.11.0-rc.3" }, "dependencies": { - "rescript": "^11.0.0-rc.1" + "rescript": "11.0.0-alpha.1" } } diff --git a/analysis/tests/src/expected/Auto.res.txt b/analysis/tests/src/expected/Auto.res.txt index 84bddf963..eb9d540e2 100644 --- a/analysis/tests/src/expected/Auto.res.txt +++ b/analysis/tests/src/expected/Auto.res.txt @@ -1,3 +1,3 @@ Hover src/Auto.res 2:13 -{"contents": {"kind": "markdown", "value": "```rescript\n(Belt.List.t<'a>, 'a => 'b) => Belt.List.t<'b>\n```\n\n---\n\n```\n \n```\n```rescript\ntype Belt.List.t<'a> = list<'a>\n```\nGo to: [Type definition](command:rescript-vscode.go_to_location?%5B%22belt_List.resi%22%2C35%2C0%5D)\n\n\n\n Returns a new list with `f` applied to each element of `someList`.\n\n ```res example\n list{1, 2}->Belt.List.map(x => x + 1) // list{3, 4}\n ```\n"}} +{"contents": {"kind": "markdown", "value": "```rescript\n(Belt.List.t<'a>, 'a => 'b) => Belt.List.t<'b>\n```\n\n---\n\n```\n \n```\n```rescript\ntype Belt.List.t<'a> = list<'a>\n```\nGo to: [Type definition](command:rescript-vscode.go_to_location?%5B%22belt_List.mli%22%2C34%2C0%5D)\n\n\n\n Returns a new list with `f` applied to each element of `someList`.\n\n ```res example\n list{1, 2}->Belt.List.map(x => x + 1) // list{3, 4}\n ```\n"}} diff --git a/analysis/tests/src/expected/CodeLens.res.txt b/analysis/tests/src/expected/CodeLens.res.txt index 94b96b6e7..06472d5e4 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 85edc9077..b520a84a2 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 33a943135..a1ecd61c8 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 7bbd0c4ff..aef3b28be 100644 --- a/analysis/tests/src/expected/Completion.res.txt +++ b/analysis/tests/src/expected/Completion.res.txt @@ -169,9 +169,9 @@ Path Array. }, { "label": "make_float", "kind": 12, - "tags": [1], + "tags": [], "detail": "int => array", - "documentation": {"kind": "markdown", "value": "Deprecated: Use Array.create_float instead.\n\n @deprecated [Array.make_float] is an alias for {!Array.create_float}. "} + "documentation": {"kind": "markdown", "value": " @deprecated [Array.make_float] is an alias for {!Array.create_float}. "} }, { "label": "fold_right", "kind": 12, @@ -253,9 +253,9 @@ Path Array. }, { "label": "create_matrix", "kind": 12, - "tags": [1], + "tags": [], "detail": "(int, int, 'a) => array>", - "documentation": {"kind": "markdown", "value": "Deprecated: Use Array.make_matrix instead.\n\n @deprecated [Array.create_matrix] is an alias for {!Array.make_matrix}. "} + "documentation": {"kind": "markdown", "value": " @deprecated [Array.create_matrix] is an alias for {!Array.make_matrix}. "} }, { "label": "create_float", "kind": 12, @@ -265,9 +265,9 @@ Path Array. }, { "label": "create", "kind": 12, - "tags": [1], + "tags": [], "detail": "(int, 'a) => array<'a>", - "documentation": {"kind": "markdown", "value": "Deprecated: Use Array.make instead.\n\n @deprecated [Array.create] is an alias for {!Array.make}. "} + "documentation": {"kind": "markdown", "value": " @deprecated [Array.create] is an alias for {!Array.make}. "} }, { "label": "init", "kind": 12, @@ -335,9 +335,9 @@ Path Array.m }, { "label": "make_float", "kind": 12, - "tags": [1], + "tags": [], "detail": "int => array", - "documentation": {"kind": "markdown", "value": "Deprecated: Use Array.create_float instead.\n\n @deprecated [Array.make_float] is an alias for {!Array.create_float}. "} + "documentation": {"kind": "markdown", "value": " @deprecated [Array.make_float] is an alias for {!Array.create_float}. "} }, { "label": "map", "kind": 12, @@ -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,7 +382,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 [{ "label": "age", "kind": 4, @@ -479,13 +479,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 }] @@ -579,7 +579,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 [{ "label": "age", "kind": 4, @@ -596,7 +596,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 [{ "label": "name", "kind": 4, @@ -613,7 +613,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 [{ "label": "name", "kind": 4, @@ -630,7 +630,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 +777,7 @@ Path my "label": "myAmazingFunction", "kind": 12, "tags": [], - "detail": "(. int, int) => int", + "detail": "(int, int) => int", "documentation": null }] @@ -918,13 +918,13 @@ Path Js.n "label": "nullable", "kind": 22, "tags": [], - "detail": "type nullable<'a> = Value('a) | Null | Undefined", - "documentation": null + "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"} }, { "label": "null", "kind": 22, "tags": [], - "detail": "type null<'a> = Value('a) | Null", + "detail": "type null<+'a>", "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 +1103,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 +1127,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,7 +1335,7 @@ Resolved opens 3 Completion.res Completion.res pervasives ContextPath Value[funRecord].someFun ContextPath Value[funRecord] Path funRecord -Found type for function (. ~name: string) => unit +Found type for function (~name: string) => unit [{ "label": "name", "kind": 4, @@ -1572,7 +1572,7 @@ 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 +Found type for function (~b: int) => callback [{ "label": "b", "kind": 4, @@ -1597,8 +1597,14 @@ Resolved opens 3 Completion.res Completion.res pervasives ContextPath Value[withCallback](~a) ContextPath Value[withCallback] Path withCallback -Found type for function int -[] +Found type for function (~b: int) => int +[{ + "label": "b", + "kind": 4, + "tags": [], + "detail": "int", + "documentation": null + }] Complete src/Completion.res 329:21 posCursor:[329:21] posNoWhite:[329:20] Found expr:[329:3->329:21] @@ -1707,7 +1713,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, @@ -1808,13 +1814,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 +1870,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 +1973,7 @@ Path r "label": "retAA", "kind": 12, "tags": [], - "detail": "(. unit) => aa", + "detail": "unit => aa", "documentation": null }, { "label": "r", diff --git a/analysis/tests/src/expected/CompletionExpressions.res.txt b/analysis/tests/src/expected/CompletionExpressions.res.txt index ebcecbab6..2be6098fd 100644 --- a/analysis/tests/src/expected/CompletionExpressions.res.txt +++ b/analysis/tests/src/expected/CompletionExpressions.res.txt @@ -777,13 +777,13 @@ ContextPath CArgument Value[fnTakingCallback]($0) ContextPath Value[fnTakingCallback] Path fnTakingCallback [{ - "label": "(. ) => {}", + "label": "() => {}", "kind": 12, "tags": [], "detail": "unit => unit", "documentation": null, "sortText": "A", - "insertText": "(. ) => {$0}", + "insertText": "() => {$0}", "insertTextFormat": 2 }] @@ -808,13 +808,13 @@ ContextPath CArgument Value[fnTakingCallback]($1) ContextPath Value[fnTakingCallback] Path fnTakingCallback [{ - "label": "(. v) => {}", + "label": "v => {}", "kind": 12, "tags": [], "detail": "bool => unit", "documentation": null, "sortText": "A", - "insertText": "(. ${1:v}) => {$0}", + "insertText": "${1:v} => {$0}", "insertTextFormat": 2 }] @@ -828,13 +828,13 @@ ContextPath CArgument Value[fnTakingCallback]($2) ContextPath Value[fnTakingCallback] Path fnTakingCallback [{ - "label": "(. event) => {}", + "label": "event => {}", "kind": 12, "tags": [], "detail": "ReactEvent.Mouse.t => unit", "documentation": null, "sortText": "A", - "insertText": "(. ${1:event}) => {$0}", + "insertText": "${1:event} => {$0}", "insertTextFormat": 2 }] @@ -848,13 +848,13 @@ ContextPath CArgument Value[fnTakingCallback]($3) ContextPath Value[fnTakingCallback] Path fnTakingCallback [{ - "label": "(. => {}", + "label": "(~on, ~off=?, variant) => {}", "kind": 12, "tags": [], "detail": "(~on: bool, ~off: bool=?, variant) => int", "documentation": null, "sortText": "A", - "insertText": "(. => {$0}", + "insertText": "(~on, ~off=?, ${1:variant}) => {$0}", "insertTextFormat": 2 }] @@ -868,13 +868,13 @@ ContextPath CArgument Value[fnTakingCallback]($4) ContextPath Value[fnTakingCallback] Path fnTakingCallback [{ - "label": "(. => {}", + "label": "(v1, v2, v3) => {}", "kind": 12, "tags": [], "detail": "(bool, option, bool) => unit", "documentation": null, "sortText": "A", - "insertText": "(. => {$0}", + "insertText": "(${1:v1}, ${2:v2}, ${3:v3}) => {$0}", "insertTextFormat": 2 }] @@ -888,13 +888,13 @@ ContextPath CArgument Value[fnTakingCallback]($5) ContextPath Value[fnTakingCallback] Path fnTakingCallback [{ - "label": "(. => {}", + "label": "(~on=?, ~off=?, ()) => {}", "kind": 12, "tags": [], "detail": "(~on: bool=?, ~off: bool=?, unit) => int", "documentation": null, "sortText": "A", - "insertText": "(. => {$0}", + "insertText": "(~on=?, ~off=?, ()) => {$0}", "insertTextFormat": 2 }] @@ -964,13 +964,13 @@ ContextPath CArgument Value[takesCb]($0) ContextPath Value[takesCb] Path takesCb [{ - "label": "(. someTyp) => {}", + "label": "someTyp => {}", "kind": 12, "tags": [], "detail": "someTyp => 'a", "documentation": null, "sortText": "A", - "insertText": "(. ${1:someTyp}) => {$0}", + "insertText": "${1:someTyp} => {$0}", "insertTextFormat": 2 }] @@ -984,13 +984,13 @@ ContextPath CArgument Value[takesCb2]($0) ContextPath Value[takesCb2] Path takesCb2 [{ - "label": "(. environment) => {}", + "label": "environment => {}", "kind": 12, "tags": [], "detail": "Environment.t => 'a", "documentation": null, "sortText": "A", - "insertText": "(. ${1:environment}) => {$0}", + "insertText": "${1:environment} => {$0}", "insertTextFormat": 2 }] @@ -1004,13 +1004,13 @@ ContextPath CArgument Value[takesCb3]($0) ContextPath Value[takesCb3] Path takesCb3 [{ - "label": "(. apiCallResult) => {}", + "label": "apiCallResult => {}", "kind": 12, "tags": [], "detail": "apiCallResult => 'a", "documentation": null, "sortText": "A", - "insertText": "(. ${1:apiCallResult}) => {$0}", + "insertText": "${1:apiCallResult} => {$0}", "insertTextFormat": 2 }] @@ -1024,13 +1024,13 @@ ContextPath CArgument Value[takesCb4]($0) ContextPath Value[takesCb4] Path takesCb4 [{ - "label": "(. apiCallResult) => {}", + "label": "apiCallResult => {}", "kind": 12, "tags": [], "detail": "option => 'a", "documentation": null, "sortText": "A", - "insertText": "(. ${1:apiCallResult}) => {$0}", + "insertText": "${1:apiCallResult} => {$0}", "insertTextFormat": 2 }] @@ -1044,13 +1044,13 @@ ContextPath CArgument Value[takesCb5]($0) ContextPath Value[takesCb5] Path takesCb5 [{ - "label": "(. apiCallResults) => {}", + "label": "apiCallResults => {}", "kind": 12, "tags": [], "detail": "array> => 'a", "documentation": null, "sortText": "A", - "insertText": "(. ${1:apiCallResults}) => {$0}", + "insertText": "${1:apiCallResults} => {$0}", "insertTextFormat": 2 }] @@ -1064,13 +1064,13 @@ ContextPath CArgument Value[commitLocalUpdate](~updater) ContextPath Value[commitLocalUpdate] Path commitLocalUpdate [{ - "label": "(. recordSourceSelectorProxy) => {}", + "label": "recordSourceSelectorProxy => {}", "kind": 12, "tags": [], "detail": "RecordSourceSelectorProxy.t => unit", "documentation": null, "sortText": "A", - "insertText": "(. ${1:recordSourceSelectorProxy}) => {$0}", + "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 d5b79a564..d15f00087 100644 --- a/analysis/tests/src/expected/CompletionFunctionArguments.res.txt +++ b/analysis/tests/src/expected/CompletionFunctionArguments.res.txt @@ -387,7 +387,7 @@ Path ReactEvent.Mouse.a "label": "ReactEvent.Mouse.altKey", "kind": 12, "tags": [], - "detail": "(. t) => bool", + "detail": "t => bool", "documentation": null }] @@ -412,7 +412,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 d52c173e5..55b527da6 100644 --- a/analysis/tests/src/expected/CompletionInferValues.res.txt +++ b/analysis/tests/src/expected/CompletionInferValues.res.txt @@ -168,7 +168,7 @@ Path ReactEvent.Mouse.pr "label": "ReactEvent.Mouse.preventDefault", "kind": 12, "tags": [], - "detail": "(. t) => unit", + "detail": "t => unit", "documentation": null }] @@ -186,16 +186,16 @@ Path event ContextPath CArgument CJsxPropValue [div] onMouseEnter($0) ContextPath CJsxPropValue [div] onMouseEnter Path ReactDOM.domProps -Path PervasivesU.JsxDOM.domProps +Path Pervasives.JsxDOM.domProps CPPipe env:CompletionInferValues -CPPipe type path:JsxEventU.Mouse.t -CPPipe pathFromEnv:JsxEventU.Mouse found:false -Path JsxEventU.Mouse.pr +CPPipe type path:JsxEventC.Mouse.t +CPPipe pathFromEnv:JsxEventC.Mouse found:false +Path JsxEventC.Mouse.pr [{ - "label": "JsxEventU.Mouse.preventDefault", + "label": "JsxEventC.Mouse.preventDefault", "kind": 12, "tags": [], - "detail": "(. t) => unit", + "detail": "t => unit", "documentation": null }] @@ -214,14 +214,14 @@ ContextPath CArgument CJsxPropValue [Div] onMouseEnter($0) ContextPath CJsxPropValue [Div] onMouseEnter Path Div.make CPPipe env:CompletionInferValues envFromCompletionItem:CompletionInferValues.Div -CPPipe type path:PervasivesU.JsxEvent.Mouse.t -CPPipe pathFromEnv:PervasivesU.JsxEvent.Mouse found:false -Path PervasivesU.JsxEvent.Mouse.pr +CPPipe type path:Pervasives.JsxEvent.Mouse.t +CPPipe pathFromEnv:Pervasives.JsxEvent.Mouse found:false +Path Pervasives.JsxEvent.Mouse.pr [{ - "label": "PervasivesU.JsxEvent.Mouse.preventDefault", + "label": "Pervasives.JsxEvent.Mouse.preventDefault", "kind": 12, "tags": [], - "detail": "(. t) => unit", + "detail": "t => unit", "documentation": null }] @@ -284,7 +284,7 @@ Path Js.String2.spl "kind": 12, "tags": [], "detail": "(t, Js_re.t) => array>", - "documentation": {"kind": "markdown", "value": "\n`splitByRe(str, regex)` splits the given `str` at every occurrence of `regex`\nand returns an array of the resulting substrings.\n\nSee [`String.split`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String/split)\non MDN.\n\n```res example\nJs.String2.splitByRe(\"art; bed , cog ;dad\", %re(\"/\\s*[,;]\\s*TODO/\")) == [\n Some(\"art\"),\n Some(\"bed\"),\n Some(\"cog\"),\n Some(\"dad\"),\n ]\n```\n"} + "documentation": {"kind": "markdown", "value": "\n`splitByRe(str, regex)` splits the given `str` at every occurrence of `regex`\nand returns an array of the resulting substrings.\n\nSee [`String.split`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String/split)\non MDN.\n\n```res example\nJs.String2.splitByRe(\"art; bed , cog ;dad\", %re(\"/\\s*[,;]\\s*/\")) == [\n Some(\"art\"),\n Some(\"bed\"),\n Some(\"cog\"),\n Some(\"dad\"),\n ]\n```\n"} }, { "label": "Js.String2.split", "kind": 12, @@ -296,7 +296,7 @@ Path Js.String2.spl "kind": 12, "tags": [], "detail": "(t, Js_re.t, ~limit: int) => array>", - "documentation": {"kind": "markdown", "value": "\n`splitByReAtMost(str, regex, ~limit:n)` splits the given `str` at every\noccurrence of `regex` and returns an array of the first `n` resulting\nsubstrings. If `n` is negative or greater than the number of substrings, the\narray will contain all the substrings.\n\nSee [`String.split`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String/split)\non MDN.\n\n```res example\nJs.String2.splitByReAtMost(\"one: two: three: four\", %re(\"/\\s*:\\s*TODO/\"), ~limit=3) == [\n Some(\"one\"),\n Some(\"two\"),\n Some(\"three\"),\n ]\n\nJs.String2.splitByReAtMost(\"one: two: three: four\", %re(\"/\\s*:\\s*TODO/\"), ~limit=0) == []\n\nJs.String2.splitByReAtMost(\"one: two: three: four\", %re(\"/\\s*:\\s*TODO/\"), ~limit=8) == [\n Some(\"one\"),\n Some(\"two\"),\n Some(\"three\"),\n Some(\"four\"),\n ]\n```\n"} + "documentation": {"kind": "markdown", "value": "\n`splitByReAtMost(str, regex, ~limit:n)` splits the given `str` at every\noccurrence of `regex` and returns an array of the first `n` resulting\nsubstrings. If `n` is negative or greater than the number of substrings, the\narray will contain all the substrings.\n\nSee [`String.split`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String/split)\non MDN.\n\n```res example\nJs.String2.splitByReAtMost(\"one: two: three: four\", %re(\"/\\s*:\\s*/\"), ~limit=3) == [\n Some(\"one\"),\n Some(\"two\"),\n Some(\"three\"),\n ]\n\nJs.String2.splitByReAtMost(\"one: two: three: four\", %re(\"/\\s*:\\s*/\"), ~limit=0) == []\n\nJs.String2.splitByReAtMost(\"one: two: three: four\", %re(\"/\\s*:\\s*/\"), ~limit=8) == [\n Some(\"one\"),\n Some(\"two\"),\n Some(\"three\"),\n Some(\"four\"),\n ]\n```\n"} }] Complete src/CompletionInferValues.res 53:130 @@ -727,13 +727,13 @@ Path ReactDOM.Client.Root. "label": "ReactDOM.Client.Root.unmount", "kind": 12, "tags": [], - "detail": "(. t, unit) => unit", + "detail": "(t, unit) => unit", "documentation": null }, { "label": "ReactDOM.Client.Root.render", "kind": 12, "tags": [], - "detail": "(. t, React.element) => unit", + "detail": "(t, React.element) => unit", "documentation": null }] @@ -762,19 +762,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 }] @@ -866,13 +866,13 @@ Path ReactDOM.Client.Root. "label": "ReactDOM.Client.Root.unmount", "kind": 12, "tags": [], - "detail": "(. t, unit) => unit", + "detail": "(t, unit) => unit", "documentation": null }, { "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/CompletionJsxProps.res.txt b/analysis/tests/src/expected/CompletionJsxProps.res.txt index 55b9c0802..43a91f799 100644 --- a/analysis/tests/src/expected/CompletionJsxProps.res.txt +++ b/analysis/tests/src/expected/CompletionJsxProps.res.txt @@ -166,7 +166,7 @@ Package opens Pervasives.JsxModules.place holder Resolved opens 1 pervasives ContextPath CJsxPropValue [div] muted Path ReactDOM.domProps -Path PervasivesU.JsxDOM.domProps +Path Pervasives.JsxDOM.domProps [{ "label": "true", "kind": 4, @@ -189,15 +189,15 @@ Package opens Pervasives.JsxModules.place holder Resolved opens 1 pervasives ContextPath CJsxPropValue [div] onMouseEnter Path ReactDOM.domProps -Path PervasivesU.JsxDOM.domProps +Path Pervasives.JsxDOM.domProps [{ - "label": "(. event) => {}", + "label": "event => {}", "kind": 12, "tags": [], - "detail": "JsxEventU.Mouse.t => unit", + "detail": "JsxEventC.Mouse.t => unit", "documentation": null, "sortText": "A", - "insertText": "{(. ${1:event}) => {$0}}", + "insertText": "{${1:event} => {$0}}", "insertTextFormat": 2 }] diff --git a/analysis/tests/src/expected/CompletionPipeChain.res.txt b/analysis/tests/src/expected/CompletionPipeChain.res.txt index 9d386b58e..52bfb0631 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 6b0e6934d..cb0319ed2 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": "(. => {}", + "label": "(v1, v2) => {}", "kind": 12, "tags": [], "detail": "(int, string) => bool", "documentation": null, "sortText": "A", - "insertText": "(. => {$0}", + "insertText": "(${1:v1}, ${2:v2}) => {$0}", "insertTextFormat": 2 }] diff --git a/analysis/tests/src/expected/CreateInterface.res.txt b/analysis/tests/src/expected/CreateInterface.res.txt index d48442879..4e1212948 100644 --- a/analysis/tests/src/expected/CreateInterface.res.txt +++ b/analysis/tests/src/expected/CreateInterface.res.txt @@ -1,6 +1,6 @@ Create Interface src/CreateInterface.res type r = {name: string, age: int} -let add: (. ~x: int, ~y: int) => int +let add: (~x: int, ~y: int) => int @react.component let make: (~name: string) => React.element module Other: { diff --git a/analysis/tests/src/expected/Debug.res.txt b/analysis/tests/src/expected/Debug.res.txt index ce23aabad..1f4ab58da 100644 --- a/analysis/tests/src/expected/Debug.res.txt +++ b/analysis/tests/src/expected/Debug.res.txt @@ -1,8 +1,8 @@ Definition src/Debug.res 2:20 -{"uri": "belt_List.resi", "range": {"start": {"line": 252, "character": 4}, "end": {"line": 252, "character": 7}}} +{"uri": "belt_List.mli", "range": {"start": {"line": 245, "character": 4}, "end": {"line": 245, "character": 7}}} Definition src/Debug.res 5:14 -{"uri": "list.res", "range": {"start": {"line": 117, "character": 4}, "end": {"line": 117, "character": 7}}} +{"uri": "list.mli", "range": {"start": {"line": 116, "character": 4}, "end": {"line": 116, "character": 7}}} Complete src/Debug.res 14:8 posCursor:[14:8] posNoWhite:[14:7] Found expr:[14:5->14:8] diff --git a/analysis/tests/src/expected/Definition.res.txt b/analysis/tests/src/expected/Definition.res.txt index b42683cae..158b7d271 100644 --- a/analysis/tests/src/expected/Definition.res.txt +++ b/analysis/tests/src/expected/Definition.res.txt @@ -8,7 +8,7 @@ Hover src/Definition.res 14:14 {"contents": {"kind": "markdown", "value": "```rescript\n('a => 'b, list<'a>) => list<'b>\n```\n\n [List.map f [a1; ...; an]] applies function [f] to [a1, ..., an],\n and builds the list [[f a1; ...; f an]]\n with the results returned by [f]. Not tail-recursive. "}} Hover src/Definition.res 18:14 -{"contents": {"kind": "markdown", "value": "```rescript\n(Belt.List.t<'a>, 'a => 'b) => Belt.List.t<'b>\n```\n\n---\n\n```\n \n```\n```rescript\ntype Belt.List.t<'a> = list<'a>\n```\nGo to: [Type definition](command:rescript-vscode.go_to_location?%5B%22belt_List.resi%22%2C35%2C0%5D)\n\n\n\n Returns a new list with `f` applied to each element of `someList`.\n\n ```res example\n list{1, 2}->Belt.List.map(x => x + 1) // list{3, 4}\n ```\n"}} +{"contents": {"kind": "markdown", "value": "```rescript\n(Belt.List.t<'a>, 'a => 'b) => Belt.List.t<'b>\n```\n\n---\n\n```\n \n```\n```rescript\ntype Belt.List.t<'a> = list<'a>\n```\nGo to: [Type definition](command:rescript-vscode.go_to_location?%5B%22belt_List.mli%22%2C34%2C0%5D)\n\n\n\n Returns a new list with `f` applied to each element of `someList`.\n\n ```res example\n list{1, 2}->Belt.List.map(x => x + 1) // list{3, 4}\n ```\n"}} Hover src/Definition.res 23:3 {"contents": {"kind": "markdown", "value": "```rescript\n(. int, int) => int\n```"}} diff --git a/analysis/tests/src/expected/Div.res.txt b/analysis/tests/src/expected/Div.res.txt index b1f0e98ed..29048516a 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 = 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/Hover.res.txt b/analysis/tests/src/expected/Hover.res.txt index 7397b61b8..e56cbe0f2 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\n(. int) => int\n```\n\nSome doc comment"}} +{"contents": {"kind": "markdown", "value": "```rescript\nint => 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\n(. unit) => int\n```\n\nDoc comment for functionWithTypeAnnotation"}} +{"contents": {"kind": "markdown", "value": "```rescript\nunit => 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\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"}} +{"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"}} Hover src/Hover.res 119:25 -{"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"}} +{"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"}} 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\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 = 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\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"}} 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/RecModules.res.txt b/analysis/tests/src/expected/RecModules.res.txt index 11104beb5..62e3e825c 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 3a7f24fc8..2dd482881 100644 --- a/analysis/tests/src/expected/SignatureHelp.res.txt +++ b/analysis/tests/src/expected/SignatureHelp.res.txt @@ -10,12 +10,12 @@ ContextPath Value[someFunc] Path someFunc argAtCursor: unlabelled<0> extracted params: -[. - int, ~two: string=?, ~three: (. unit) => unit, ~four: someVariant, unit] +[( + 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": [1, 8], "documentation": {"kind": "markdown", "value": "```rescript\nint\n```"}}, {"label": [12, 26], "documentation": {"kind": "markdown", "value": "```rescript\noption\n```"}}, {"label": [30, 54], "documentation": {"kind": "markdown", "value": "```rescript\n(. unit) => unit\n```"}}, {"label": [58, 76], "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": [80, 84], "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": [{"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```"}}], "documentation": {"kind": "markdown", "value": " Does stuff. "} }], "activeSignature": 0, @@ -34,12 +34,12 @@ ContextPath Value[someFunc] Path someFunc argAtCursor: unlabelled<0> extracted params: -[. - int, ~two: string=?, ~three: (. unit) => unit, ~four: someVariant, unit] +[( + 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": [1, 8], "documentation": {"kind": "markdown", "value": "```rescript\nint\n```"}}, {"label": [12, 26], "documentation": {"kind": "markdown", "value": "```rescript\noption\n```"}}, {"label": [30, 54], "documentation": {"kind": "markdown", "value": "```rescript\n(. unit) => unit\n```"}}, {"label": [58, 76], "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": [80, 84], "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": [{"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```"}}], "documentation": {"kind": "markdown", "value": " Does stuff. "} }], "activeSignature": 0, @@ -58,12 +58,12 @@ ContextPath Value[someFunc] Path someFunc argAtCursor: ~two extracted params: -[. - int, ~two: string=?, ~three: (. unit) => unit, ~four: someVariant, unit] +[( + 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": [1, 8], "documentation": {"kind": "markdown", "value": "```rescript\nint\n```"}}, {"label": [12, 26], "documentation": {"kind": "markdown", "value": "```rescript\noption\n```"}}, {"label": [30, 54], "documentation": {"kind": "markdown", "value": "```rescript\n(. unit) => unit\n```"}}, {"label": [58, 76], "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": [80, 84], "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": [{"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```"}}], "documentation": {"kind": "markdown", "value": " Does stuff. "} }], "activeSignature": 0, @@ -82,12 +82,12 @@ ContextPath Value[someFunc] Path someFunc argAtCursor: ~two extracted params: -[. - int, ~two: string=?, ~three: (. unit) => unit, ~four: someVariant, unit] +[( + 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": [1, 8], "documentation": {"kind": "markdown", "value": "```rescript\nint\n```"}}, {"label": [12, 26], "documentation": {"kind": "markdown", "value": "```rescript\noption\n```"}}, {"label": [30, 54], "documentation": {"kind": "markdown", "value": "```rescript\n(. unit) => unit\n```"}}, {"label": [58, 76], "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": [80, 84], "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": [{"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```"}}], "documentation": {"kind": "markdown", "value": " Does stuff. "} }], "activeSignature": 0, @@ -106,12 +106,12 @@ ContextPath Value[someFunc] Path someFunc argAtCursor: ~four extracted params: -[. - int, ~two: string=?, ~three: (. unit) => unit, ~four: someVariant, unit] +[( + 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": [1, 8], "documentation": {"kind": "markdown", "value": "```rescript\nint\n```"}}, {"label": [12, 26], "documentation": {"kind": "markdown", "value": "```rescript\noption\n```"}}, {"label": [30, 54], "documentation": {"kind": "markdown", "value": "```rescript\n(. unit) => unit\n```"}}, {"label": [58, 76], "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": [80, 84], "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": [{"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```"}}], "documentation": {"kind": "markdown", "value": " Does stuff. "} }], "activeSignature": 0, @@ -130,12 +130,12 @@ ContextPath Value[someFunc] Path someFunc argAtCursor: ~four extracted params: -[. - int, ~two: string=?, ~three: (. unit) => unit, ~four: someVariant, unit] +[( + 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": [1, 8], "documentation": {"kind": "markdown", "value": "```rescript\nint\n```"}}, {"label": [12, 26], "documentation": {"kind": "markdown", "value": "```rescript\noption\n```"}}, {"label": [30, 54], "documentation": {"kind": "markdown", "value": "```rescript\n(. unit) => unit\n```"}}, {"label": [58, 76], "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": [80, 84], "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": [{"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```"}}], "documentation": {"kind": "markdown", "value": " Does stuff. "} }], "activeSignature": 0, @@ -154,11 +154,11 @@ ContextPath Value[otherFunc] Path otherFunc argAtCursor: unlabelled<0> extracted params: -[. string, int, float] +[(string, int, float] { "signatures": [{ - "label": "(. string, int, float) => unit", - "parameters": [{"label": [1, 9], "documentation": {"kind": "markdown", "value": "```rescript\nstring\n```"}}, {"label": [11, 14], "documentation": {"kind": "markdown", "value": "```rescript\nstring\n```"}}, {"label": [16, 21], "documentation": {"kind": "markdown", "value": "```rescript\nstring\n```"}}] + "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```"}}] }], "activeSignature": 0, "activeParameter": 0 @@ -176,11 +176,11 @@ ContextPath Value[otherFunc] Path otherFunc argAtCursor: unlabelled<0> extracted params: -[. string, int, float] +[(string, int, float] { "signatures": [{ - "label": "(. string, int, float) => unit", - "parameters": [{"label": [1, 9], "documentation": {"kind": "markdown", "value": "```rescript\nstring\n```"}}, {"label": [11, 14], "documentation": {"kind": "markdown", "value": "```rescript\nstring\n```"}}, {"label": [16, 21], "documentation": {"kind": "markdown", "value": "```rescript\nstring\n```"}}] + "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```"}}] }], "activeSignature": 0, "activeParameter": 0 @@ -198,11 +198,11 @@ ContextPath Value[otherFunc] Path otherFunc argAtCursor: unlabelled<2> extracted params: -[. string, int, float] +[(string, int, float] { "signatures": [{ - "label": "(. string, int, float) => unit", - "parameters": [{"label": [1, 9], "documentation": {"kind": "markdown", "value": "```rescript\nstring\n```"}}, {"label": [11, 14], "documentation": {"kind": "markdown", "value": "```rescript\nstring\n```"}}, {"label": [16, 21], "documentation": {"kind": "markdown", "value": "```rescript\nstring\n```"}}] + "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```"}}] }], "activeSignature": 0, "activeParameter": 2 @@ -220,11 +220,11 @@ ContextPath Value[Completion, Lib, foo] Path Completion.Lib.foo argAtCursor: ~age extracted params: -[. ~age: int, ~name: string] +[(~age: int, ~name: string] { "signatures": [{ - "label": "(. ~age: int, ~name: string) => string", - "parameters": [{"label": [1, 12], "documentation": {"kind": "markdown", "value": "```rescript\nint\n```"}}, {"label": [14, 27], "documentation": {"kind": "markdown", "value": "```rescript\nstring\n```"}}] + "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```"}}] }], "activeSignature": 0, "activeParameter": 0 @@ -242,11 +242,11 @@ ContextPath Value[iAmSoSpecial] Path iAmSoSpecial argAtCursor: unlabelled<0> extracted params: -[. string] +[string] { "signatures": [{ - "label": "(. string) => unit", - "parameters": [{"label": [1, 9], "documentation": {"kind": "markdown", "value": "```rescript\nstring\n```"}}] + "label": "string => unit", + "parameters": [{"label": [0, 6], "documentation": {"kind": "markdown", "value": "```rescript\nstring\n```"}}] }], "activeSignature": 0, "activeParameter": 0 @@ -265,11 +265,11 @@ ContextPath Value[otherFunc] Path otherFunc argAtCursor: unlabelled<1> extracted params: -[. string, int, float] +[(string, int, float] { "signatures": [{ - "label": "(. string, int, float) => unit", - "parameters": [{"label": [1, 9], "documentation": {"kind": "markdown", "value": "```rescript\nstring\n```"}}, {"label": [11, 14], "documentation": {"kind": "markdown", "value": "```rescript\nstring\n```"}}, {"label": [16, 21], "documentation": {"kind": "markdown", "value": "```rescript\nstring\n```"}}] + "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```"}}] }], "activeSignature": 0, "activeParameter": 1 @@ -287,11 +287,11 @@ ContextPath Value[fn] Path fn argAtCursor: unlabelled<1> extracted params: -[. int, string, int] +[(int, string, int] { "signatures": [{ - "label": "(. int, string, int) => unit", - "parameters": [{"label": [1, 6], "documentation": {"kind": "markdown", "value": "```rescript\nint\n```"}}, {"label": [8, 14], "documentation": {"kind": "markdown", "value": "```rescript\nint\n```"}}, {"label": [16, 19], "documentation": {"kind": "markdown", "value": "```rescript\nint\n```"}}] + "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```"}}] }], "activeSignature": 0, "activeParameter": 1 @@ -309,11 +309,11 @@ ContextPath Value[fn] Path fn argAtCursor: unlabelled<1> extracted params: -[. int, string, int] +[(int, string, int] { "signatures": [{ - "label": "(. int, string, int) => unit", - "parameters": [{"label": [1, 6], "documentation": {"kind": "markdown", "value": "```rescript\nint\n```"}}, {"label": [8, 14], "documentation": {"kind": "markdown", "value": "```rescript\nint\n```"}}, {"label": [16, 19], "documentation": {"kind": "markdown", "value": "```rescript\nint\n```"}}] + "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```"}}] }], "activeSignature": 0, "activeParameter": 1 @@ -331,11 +331,11 @@ ContextPath Value[fn] Path fn argAtCursor: unlabelled<2> extracted params: -[. int, string, int] +[(int, string, int] { "signatures": [{ - "label": "(. int, string, int) => unit", - "parameters": [{"label": [1, 6], "documentation": {"kind": "markdown", "value": "```rescript\nint\n```"}}, {"label": [8, 14], "documentation": {"kind": "markdown", "value": "```rescript\nint\n```"}}, {"label": [16, 19], "documentation": {"kind": "markdown", "value": "```rescript\nint\n```"}}] + "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```"}}] }], "activeSignature": 0, "activeParameter": 2 @@ -355,11 +355,11 @@ ContextPath Value[iAmSoSpecial] Path iAmSoSpecial argAtCursor: unlabelled<0> extracted params: -[. string] +[string] { "signatures": [{ - "label": "(. string) => unit", - "parameters": [{"label": [1, 9], "documentation": {"kind": "markdown", "value": "```rescript\nstring\n```"}}] + "label": "string => unit", + "parameters": [{"label": [0, 6], "documentation": {"kind": "markdown", "value": "```rescript\nstring\n```"}}] }], "activeSignature": 0, "activeParameter": 0 @@ -381,12 +381,12 @@ ContextPath Value[someFunc] Path someFunc argAtCursor: unlabelled<0> extracted params: -[. - int, ~two: string=?, ~three: (. unit) => unit, ~four: someVariant, unit] +[( + 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": [1, 8], "documentation": {"kind": "markdown", "value": "```rescript\nint\n```"}}, {"label": [12, 26], "documentation": {"kind": "markdown", "value": "```rescript\noption\n```"}}, {"label": [30, 54], "documentation": {"kind": "markdown", "value": "```rescript\n(. unit) => unit\n```"}}, {"label": [58, 76], "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": [80, 84], "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": [{"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```"}}], "documentation": {"kind": "markdown", "value": " Does stuff. "} }], "activeSignature": 0,