lean4-htt/tests/lean/interactive/hoverMatch.lean.expected.out
Marc Huisinga c95100e8fd
fix: de-prioritize PartialTermInfo in hover info selection (#10047)
This PR ensures that hovering over `match` displays the type of the
match.
2025-08-25 08:47:14 +00:00

8 lines
1.6 KiB
Text

{"textDocument": {"uri": "file:///hoverMatch.lean"},
"position": {"line": 2, "character": 4}}
{"range":
{"start": {"line": 2, "character": 2}, "end": {"line": 5, "character": 18}},
"contents":
{"value":
"```lean\nBool\n```\n***\nPattern matching. `match e, ... with | p, ... => f | ...` matches each given\nterm `e` against each pattern `p` of a match alternative. When all patterns\nof an alternative match, the `match` term evaluates to the value of the\ncorresponding right-hand side `f` with the pattern variables bound to the\nrespective matched values.\nIf used as `match h : e, ... with | p, ... => f | ...`, `h : e = p` is available\nwithin `f`.\n\nWhen not constructing a proof, `match` does not automatically substitute variables\nmatched on in dependent variables' types. Use `match (generalizing := true) ...` to\nenforce this.\n\nSyntax quotations can also be used in a pattern match.\nThis matches a `Syntax` value against quotations, pattern variables, or `_`.\n\nQuoted identifiers only match identical identifiers - custom matching such as by the preresolved\nnames only should be done explicitly.\n\n`Syntax.atom`s are ignored during matching by default except when part of a built-in literal.\nFor users introducing new atoms, we recommend wrapping them in dedicated syntax kinds if they\nshould participate in matching.\nFor example, in\n```lean\nsyntax \"c\" (\"foo\" <|> \"bar\") ...\n```\n`foo` and `bar` are indistinguishable during matching, but in\n```lean\nsyntax foo := \"foo\"\nsyntax \"c\" (foo <|> \"bar\") ...\n```\nthey are not.\n",
"kind": "markdown"}}