Skip to content

Commit 07ab10f

Browse files
committedMar 11, 2025
commit more tests
1 parent e518d51 commit 07ab10f

File tree

3 files changed

+9
-9
lines changed

3 files changed

+9
-9
lines changed
 
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
11
Hover src/Auto.res 2:13
2-
{"contents": {"kind": "markdown", "value": "```rescript\n('a => 'b, List.t<'a>) => List.t<'b>\n```\n\n---\n\n```\n \n```\n```rescript\ntype List.t<'a> = list<'a>\n```\nGo to: [Type definition](command:rescript-vscode.go_to_location?%5B%22Stdlib_List.resi%22%2C34%2C0%5D)\n"}}
2+
{"contents": {"kind": "markdown", "value": "```rescript\n('a => 'b, List.t<'a>) => List.t<'b>\n```\n\n---\n\n```\n \n```\n```rescript\ntype List.t<'a> = list<'a>\n```\nGo to: [Type definition](command:rescript-vscode.go_to_location?%5B%22Stdlib_List.resi%22%2C36%2C0%5D)\n"}}
33

‎tests/analysis_tests/tests/src/expected/Completion.res.txt

+6-6
Original file line numberDiff line numberDiff line change
@@ -10,31 +10,31 @@ Path MyList.m
1010
"label": "mapReverse",
1111
"kind": 12,
1212
"tags": [],
13-
"detail": "(t<'a>, 'a => 'b) => t<'b>",
13+
"detail": "(list<'a>, 'a => 'b) => list<'b>",
1414
"documentation": {"kind": "markdown", "value": "\n`mapReverse(list, f)` is equivalent to `map` function.\n\n## Examples\n\n```rescript\nlet f = x => x * x\nlet l = list{3, 4, 5}\n\nlet withMap = List.map(l, f)->List.reverse\nlet withMapReverse = l->List.mapReverse(f)\n\nConsole.log(withMap == withMapReverse) // true\n```\n"}
1515
}, {
1616
"label": "mapReverse2",
1717
"kind": 12,
1818
"tags": [],
19-
"detail": "(t<'a>, t<'b>, ('a, 'b) => 'c) => t<'c>",
19+
"detail": "(list<'a>, list<'b>, ('a, 'b) => 'c) => list<'c>",
2020
"documentation": {"kind": "markdown", "value": "\n`mapReverse2(list1, list2, f)` is equivalent to `List.zipBy(list1, list2, f)->List.reverse`.\n\n## Examples\n\n```rescript\nList.mapReverse2(list{1, 2, 3}, list{1, 2}, (a, b) => a + b) // list{4, 2}\n```\n"}
2121
}, {
2222
"label": "make",
2323
"kind": 12,
2424
"tags": [],
25-
"detail": "(~length: int, 'a) => t<'a>",
25+
"detail": "(~length: int, 'a) => list<'a>",
2626
"documentation": {"kind": "markdown", "value": "\n`make(length, value)` returns a list of length `length` with each element filled\nwith `value`. Returns an empty list if `value` is negative.\n\n## Examples\n\n```rescript\nList.make(~length=3, 1) // list{1, 1, 1}\n```\n"}
2727
}, {
2828
"label": "mapWithIndex",
2929
"kind": 12,
3030
"tags": [],
31-
"detail": "(t<'a>, ('a, int) => 'b) => t<'b>",
31+
"detail": "(list<'a>, ('a, int) => 'b) => list<'b>",
3232
"documentation": {"kind": "markdown", "value": "\n`mapWithIndex(list, f)` applies `f` to each element of `list`. Function `f`\ntakes two arguments: the index starting from 0 and the element from `list`, in\nthat order.\n\n## Examples\n\n```rescript\nlist{1, 2, 3}->List.mapWithIndex((x, index) => index + x) // list{1, 3, 5}\n```\n"}
3333
}, {
3434
"label": "map",
3535
"kind": 12,
3636
"tags": [],
37-
"detail": "(t<'a>, 'a => 'b) => t<'b>",
37+
"detail": "(list<'a>, 'a => 'b) => list<'b>",
3838
"documentation": {"kind": "markdown", "value": "\n`map(list, f)` returns a new list with `f` applied to each element of `list`.\n\n## Examples\n\n```rescript\nlist{1, 2}->List.map(x => x + 1) // list{3, 4}\n```\n"}
3939
}]
4040

@@ -2517,7 +2517,7 @@ Path Stdlib.Result.g
25172517
"kind": 12,
25182518
"tags": [],
25192519
"detail": "result<'a, 'b> => 'a",
2520-
"documentation": {"kind": "markdown", "value": "\n Result types are really useful to describe the result of a certain operation\n without relying on exceptions or `option` types.\n\n This module gives you useful utilities to create and combine `Result` data.\n"}
2520+
"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 Result.getExn(Result.Ok(42)) == 42\n\n switch Result.getExn(Error(\"Invalid data\")) {\n | exception Not_found => assert(true)\n | _ => assert(false)\n }\n ```\n"}
25212521
}, {
25222522
"label": "Result.getOr",
25232523
"kind": 12,

‎tests/analysis_tests/tests/src/expected/Definition.res.txt

+2-2
Original file line numberDiff line numberDiff line change
@@ -5,10 +5,10 @@ Definition src/Definition.res 10:23
55
{"uri": "Definition.res", "range": {"start": {"line": 6, "character": 7}, "end": {"line": 6, "character": 13}}}
66

77
Hover src/Definition.res 14:14
8-
{"contents": {"kind": "markdown", "value": "```rescript\n(List.t<'a>, 'a => 'b) => List.t<'b>\n```\n\n---\n\n```\n \n```\n```rescript\ntype List.t<'a> = list<'a>\n```\nGo to: [Type definition](command:rescript-vscode.go_to_location?%5B%22Stdlib_List.resi%22%2C34%2C0%5D)\n\n---\n\n`map(list, f)` returns a new list with `f` applied to each element of `list`.\n\n## Examples\n\n```rescript\nlist{1, 2}->List.map(x => x + 1) // list{3, 4}\n```\n"}}
8+
{"contents": {"kind": "markdown", "value": "```rescript\n(List.t<'a>, 'a => 'b) => List.t<'b>\n```\n\n---\n\n```\n \n```\n```rescript\ntype List.t<'a> = list<'a>\n```\nGo to: [Type definition](command:rescript-vscode.go_to_location?%5B%22Stdlib_List.resi%22%2C36%2C0%5D)\n\n---\n\n`map(list, f)` returns a new list with `f` applied to each element of `list`.\n\n## Examples\n\n```rescript\nlist{1, 2}->List.map(x => x + 1) // list{3, 4}\n```\n"}}
99

1010
Hover src/Definition.res 18:14
11-
{"contents": {"kind": "markdown", "value": "```rescript\n('a => 'b, List.t<'a>) => List.t<'b>\n```\n\n---\n\n```\n \n```\n```rescript\ntype List.t<'a> = list<'a>\n```\nGo to: [Type definition](command:rescript-vscode.go_to_location?%5B%22Stdlib_List.resi%22%2C34%2C0%5D)\n"}}
11+
{"contents": {"kind": "markdown", "value": "```rescript\n('a => 'b, List.t<'a>) => List.t<'b>\n```\n\n---\n\n```\n \n```\n```rescript\ntype List.t<'a> = list<'a>\n```\nGo to: [Type definition](command:rescript-vscode.go_to_location?%5B%22Stdlib_List.resi%22%2C36%2C0%5D)\n"}}
1212

1313
Hover src/Definition.res 23:3
1414
{"contents": {"kind": "markdown", "value": "```rescript\n(int, int) => int\n```"}}

0 commit comments

Comments
 (0)