[Trace - 07:01:27 PM] Sending request 'textDocument/codeAction - (40)'.
Params: {
"textDocument": {
"uri": "file:///Users/patrickt/src/possession/src/UI/MainMenu.hs"
},
"range": {
"start": {
"line": 44,
"character": 0
},
"end": {
"line": 44,
"character": 0
}
},
"context": {
"diagnostics": []
}
}
[Trace - 07:01:27 PM] Sending request 'textDocument/documentHighlight - (41)'.
Params: {
"textDocument": {
"uri": "file:///Users/patrickt/src/possession/src/UI/MainMenu.hs"
},
"position": {
"line": 44,
"character": 0
}
}
[Trace - 07:01:28 PM] Received response 'textDocument/documentHighlight - (41)' in 126ms.
Result: []
[Trace - 07:01:28 PM] Received response 'textDocument/codeAction - (40)' in 127ms.
Result: []
[Trace - 07:01:28 PM] Sending request 'textDocument/hover - (42)'.
Params: {
"textDocument": {
"uri": "file:///Users/patrickt/src/possession/src/UI/MainMenu.hs"
},
"position": {
"line": 44,
"character": 0
}
}
[Trace - 07:01:28 PM] Received response 'textDocument/hover - (42)' in 133ms.
Result: {
"range": {
"end": {
"character": 63,
"line": 81
},
"start": {
"character": 0,
"line": 0
}
},
"contents": {
"value": "",
"kind": "markdown"
}
}
[Trace - 07:01:29 PM] Sending request 'workspace/executeCommand - (43)'.
Params: {
"command": "61463:eval:evalCommand",
"arguments": [
{
"statements": [
[
"moveUp NewGame",
44
]
],
"editTarget": {
"end": {
"character": 0,
"line": 45
},
"start": {
"character": 0,
"line": 45
}
},
"module_": {
"uri": "file:///Users/patrickt/src/possession/src/UI/MainMenu.hs"
}
}
]
}
[Trace - 07:01:29 PM] Received request 'window/workDoneProgress/create - (5).
Params: {
"token": 2
}
[Trace - 07:01:29 PM] Sending response 'window/workDoneProgress/create - (5)'. Processing request took 0ms
Params: {
"jsonrpc": "2.0",
"id": 5,
"result": null
}
[Trace - 07:01:29 PM] Received notification '$/progress'.
Params: {
"token": 2,
"value": {
"title": "Eval",
"cancellable": true,
"kind": "begin"
}
}
[Trace - 07:01:30 PM] Received notification '$/progress'.
Params: {
"token": 2,
"value": {
"kind": "end"
}
}
[Trace - 07:01:30 PM] Received response 'workspace/executeCommand - (43)' in 543ms.
Result: null
[Trace - 07:01:30 PM] Sending notification 'textDocument/didChange'.
Params: {
"textDocument": {
"uri": "file:///Users/patrickt/src/possession/src/UI/MainMenu.hs",
"version": 3
},
"contentChanges": [
{
"range": {
"start": {
"line": 45,
"character": 0
},
"end": {
"line": 45,
"character": 0
}
},
"rangeLength": 0,
"text": "-- expectJust getLinkDeps\n-- CallStack (from HasCallStack):\n-- error, called at compiler/utils/Maybes.hs:57:27 in ghc:Maybes\n-- expectJust, called at compiler/ghci/Linker.hs:708:28 in ghc:Linker\n"
}
]
}
[Trace - 07:01:30 PM] Received request 'workspace/applyEdit - (6).
Params: {
"edit": {
"changes": {
"file:///Users/patrickt/src/possession/src/UI/MainMenu.hs": [
{
"newText": "-- expectJust getLinkDeps\n-- CallStack (from HasCallStack):\n-- error, called at compiler/utils/Maybes.hs:57:27 in ghc:Maybes\n-- expectJust, called at compiler/ghci/Linker.hs:708:28 in ghc:Linker\n",
"range": {
"end": {
"character": 0,
"line": 45
},
"start": {
"character": 0,
"line": 45
}
}
}
]
}
}
}
[Trace - 07:01:30 PM] Sending response 'workspace/applyEdit - (6)'. Processing request took 6ms
Params: {
"jsonrpc": "2.0",
"id": 6,
"result": {
"applied": true
}
}
[Trace - 07:01:30 PM] Sending request 'textDocument/codeAction - (44)'.
Params: {
"textDocument": {
"uri": "file:///Users/patrickt/src/possession/src/UI/MainMenu.hs"
},
"range": {
"start": {
"line": 44,
"character": 0
},
"end": {
"line": 44,
"character": 0
}
},
"context": {
"diagnostics": []
}
}
[Trace - 07:01:30 PM] Received response 'textDocument/codeAction - (44)' in 150ms.
Result: []
[Trace - 07:01:30 PM] Sending request 'textDocument/codeAction - (45)'.
Params: {
"textDocument": {
"uri": "file:///Users/patrickt/src/possession/src/UI/MainMenu.hs"
},
"range": {
"start": {
"line": 44,
"character": 0
},
"end": {
"line": 44,
"character": 0
}
},
"context": {
"diagnostics": []
}
}
[Trace - 07:01:30 PM] Sending request 'textDocument/documentHighlight - (46)'.
Params: {
"textDocument": {
"uri": "file:///Users/patrickt/src/possession/src/UI/MainMenu.hs"
},
"position": {
"line": 44,
"character": 0
}
}
[Trace - 07:01:30 PM] Received response 'textDocument/documentHighlight - (46)' in 131ms.
Result: []
[Trace - 07:01:30 PM] Received response 'textDocument/codeAction - (45)' in 131ms.
Result: []
[Trace - 07:01:30 PM] Sending request 'textDocument/codeLens - (47)'.
Params: {
"textDocument": {
"uri": "file:///Users/patrickt/src/possession/src/UI/MainMenu.hs"
}
}
[Trace - 07:01:31 PM] Sending request 'textDocument/hover - (48)'.
Params: {
"textDocument": {
"uri": "file:///Users/patrickt/src/possession/src/UI/MainMenu.hs"
},
"position": {
"line": 44,
"character": 0
}
}
[Trace - 07:01:31 PM] Received response 'textDocument/codeLens - (47)' in 344ms.
Result: [
{
"range": {
"end": {
"character": 14,
"line": 44
},
"start": {
"character": 0,
"line": 44
}
},
"command": {
"title": "Refresh...",
"arguments": [
{
"statements": [
[
"moveUp NewGame",
44
]
],
"editTarget": {
"end": {
"character": 0,
"line": 49
},
"start": {
"character": 0,
"line": 45
}
},
"module_": {
"uri": "file:///Users/patrickt/src/possession/src/UI/MainMenu.hs"
}
}
],
"command": "61463:eval:evalCommand"
}
},
{
"range": {
"end": {
"character": 18,
"line": 19
},
"start": {
"character": 0,
"line": 19
}
},
"command": {
"title": "import Data.Vector ( Vector )",
"arguments": [
{
"changes": {
"file:///Users/patrickt/src/possession/src/UI/MainMenu.hs": [
{
"newText": "import Data.Vector ( Vector )",
"range": {
"end": {
"character": 18,
"line": 19
},
"start": {
"character": 0,
"line": 19
}
}
}
]
}
}
],
"command": "61463:importLens:ImportLensCommand"
}
},
{
"range": {
"end": {
"character": 13,
"line": 21
},
"start": {
"character": 0,
"line": 21
}
},
"command": {
"title": "import Optics ( toLensVL )",
"arguments": [
{
"changes": {
"file:///Users/patrickt/src/possession/src/UI/MainMenu.hs": [
{
"newText": "import Optics ( toLensVL )",
"range": {
"end": {
"character": 13,
"line": 21
},
"start": {
"character": 0,
"line": 21
}
}
}
]
}
}
],
"command": "61463:importLens:ImportLensCommand"
}
}
]
[Trace - 07:01:31 PM] Received response 'textDocument/hover - (48)' in 295ms.
Result: {
"range": {
"end": {
"character": 63,
"line": 85
},
"start": {
"character": 0,
"line": 0
}
},
"contents": {
"value": "",
"kind": "markdown"
}
}
[Trace - 07:01:31 PM] Sending request 'textDocument/codeAction - (49)'.
Params: {
"textDocument": {
"uri": "file:///Users/patrickt/src/possession/src/UI/MainMenu.hs"
},
"range": {
"start": {
"line": 38,
"character": 11
},
"end": {
"line": 38,
"character": 11
}
},
"context": {
"diagnostics": []
}
}
[Trace - 07:01:31 PM] Received response 'textDocument/codeAction - (49)' in 251ms.
Result: []
[Trace - 07:01:59 PM] Sending request 'textDocument/codeAction - (50)'.
Params: {
"textDocument": {
"uri": "file:///Users/patrickt/src/possession/src/UI/MainMenu.hs"
},
"range": {
"start": {
"line": 38,
"character": 11
},
"end": {
"line": 38,
"character": 11
}
},
"context": {
"diagnostics": []
}
}
[Trace - 07:01:59 PM] Received response 'textDocument/codeAction - (50)' in 127ms.
Result: []
[Trace - 07:01:59 PM] Sending request 'textDocument/hover - (51)'.
Params: {
"textDocument": {
"uri": "file:///Users/patrickt/src/possession/src/UI/MainMenu.hs"
},
"position": {
"line": 38,
"character": 11
}
}
[Trace - 07:01:59 PM] Received response 'textDocument/hover - (51)' in 127ms.
Result: {
"range": {
"end": {
"character": 11,
"line": 38
},
"start": {
"character": 5,
"line": 38
}
},
"contents": {
"value": "\n```haskell\nChoice\n```\n\n*Defined at /Users/patrickt/src/possession/src/UI/MainMenu.hs:39:1*\n\n\n\n",
"kind": "markdown"
}
}
Subject of the issue
I’ve been experimenting with newer LSP features, and when trying to use the
>>>- style lens, I’ve encountered a failure. Clicking such a code lens inserts the following in to the document:Your environment
haskell-language-server --probe-toolsorhaskell-language-server-wrapper --probe-toolsWhich lsp-client do you use
Describe your project (alternative: link to the project)
Link is here. The code-lens invocation is here. It’s a Cabal project, with a hie.yaml file, with debugging info enabled.
Contents of
hie.yamlSteps to reproduce
Download the linked project (commit
ee0ea91a23c5c03bd1efe9707e727596a9380d02), and invoke the Evaluate code action.Expected behaviour
Inserts
NewGame.Actual behaviour
Inserts the following:
Include debug information
Execute in the root of your project the command
haskell-language-server --debug .and paste the logs here:Debug output:
Paste the logs from the lsp-client, e.g. for VS Code
LSP logs: