haskell / haskell-ide-engine

The engine for haskell ide-integration. Not an IDE
BSD 3-Clause "New" or "Revised" License
2.38k stars 213 forks source link

Go to definition fails #1746

Open GorveenN opened 4 years ago

GorveenN commented 4 years ago

I created a simple stack project with following structure:

├── app
│   └── Main.hs
├── ChangeLog.md
├── hie.yaml
├── LICENSE
├── package.yaml
├── README.md
├── Setup.hs
├── simple.cabal
├── src
│   └── Lib.hs
├── stack.yaml
├── stack.yaml.lock
└── test
    └── Spec.hs

Main.hs

module Main where

import Lib

main :: IO ()
main = foo

Lib.hs

module Lib where

foo :: IO ()
foo = putStrLn "foo"

When I open only Main.hs file and try to go to definition of foo I get "Definition not Found". When I do the same thing but first I open Lib.hs (where function foo is defined) and then I open Main.hs there is no error and I can get to definition of foo.

Log from first scenario:

## versions

vim version: NVIM v0.4.3
node version: v13.13.0
coc.nvim version: 0.0.77-817efd5108
term: screen
platform: linux

## Output channel: snippets

[Info 12:13:31 AM] Using ultisnips directories: UltiSnips /home/xps/.config/coc/ultisnips
[Info 12:13:31 AM] Using ultisnips python command: pyx

## Output channel: languageserver.haskell

2020-04-21 00:13:32.135839293 [ThreadId 4] - run entered for hie-wrapper(hie-wrapper) Version 1.3, Git revision 78eb87b221481d81b8764c821ab3d673e9768464 (3873 commits) x86_64 ghc-8.8.3
2020-04-21 00:13:32.136317753 [ThreadId 4] - Current directory:/home/xps/simple
2020-04-21 00:13:32.136372424 [ThreadId 4] - Operating system:linux
2020-04-21 00:13:32.136400704 [ThreadId 4] - args:["--lsp","--debug"]
2020-04-21 00:13:32.136478462 [ThreadId 4] - Found "/home/xps/simple/hie.yaml" for "/home/xps/simple/File.hs"
2020-04-21 00:13:32.157000317 [ThreadId 4] - Module "/home/xps/simple/File.hs" is loaded by Cradle: Cradle {cradleRootDir = "/home/xps/simple", cradleOptsProg = CradleAction: Stack}
2020-04-21 00:13:32.157211248 [ThreadId 4] - Cradle directory:/home/xps/simple
2020-04-21 00:13:32.157354404 [ThreadId 4] - Executing Stack GHC with args: --numeric-version
2020-04-21 00:13:32.530568304 [ThreadId 4] - GHC Output: "Just "8.8.3""
2020-04-21 00:13:32.530651054 [ThreadId 4] - Project GHC version:8.8.3
2020-04-21 00:13:32.530688413 [ThreadId 4] - hie exe candidates :["hie-8.8.3","hie-8.8","hie"]
2020-04-21 00:13:32.531111812 [ThreadId 4] - found hie exe at:/usr/bin/hie-8.8.3
2020-04-21 00:13:32.531154789 [ThreadId 4] - args:["--lsp","--debug"]
2020-04-21 00:13:32.531201836 [ThreadId 4] - launching ....

2020-04-21 00:13:32.536475905 [ThreadId 4] - Run entered for HIE(hie-8.8.3) Version 1.3, Git revision 78eb87b221481d81b8764c821ab3d673e9768464 (3873 commits) x86_64 ghc-8.8.3
2020-04-21 00:13:32.537718779 [ThreadId 4] - Operating as a LSP server on stdio
2020-04-21 00:13:32.53781528 [ThreadId 4] - Current directory:/home/xps/simple
2020-04-21 00:13:32.53796411 [ThreadId 4] - Operating system:linux
2020-04-21 00:13:32.538021885 [ThreadId 4] - args:["--lsp","--debug"]
2020-04-21 00:13:32.53816839 [ThreadId 4] - 

haskell-lsp:Starting up server ...
2020-04-21 00:13:32.538416251 [ThreadId 4] - ---> {"jsonrpc":"2.0","id":0,"method":"initialize","params":{"processId":139460,"rootPath":"/home/xps/simple","rootUri":"file:///home/xps/simple","capabilities":{"workspace":{"applyEdit":true,"workspaceEdit":{"documentChanges":true,"resourceOperations":["create","rename","delete"],"failureHandling":"textOnlyTransactional"},"didChangeConfiguration":{"dynamicRegistration":true},"didChangeWatchedFiles":{"dynamicRegistration":true},"symbol":{"dynamicRegistration":true,"symbolKind":{"valueSet":[1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26]}},"executeCommand":{"dynamicRegistration":true},"configuration":true,"workspaceFolders":true},"textDocument":{"publishDiagnostics":{"relatedInformation":true,"versionSupport":false},"synchronization":{"dynamicRegistration":true,"willSave":true,"willSaveWaitUntil":true,"didSave":true},"completion":{"dynamicRegistration":true,"contextSupport":true,"completionItem":{"snippetSupport":true,"commitCharactersSupport":true,"documentationFormat":["markdown","plaintext"],"deprecatedSupport":true,"preselectSupport":true},"completionItemKind":{"valueSet":[1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25]}},"hover":{"dynamicRegistration":true,"contentFormat":["markdown","plaintext"]},"signatureHelp":{"dynamicRegistration":true,"signatureInformation":{"documentationFormat":["markdown","plaintext"],"parameterInformation":{"labelOffsetSupport":true}}},"definition":{"dynamicRegistration":true},"references":{"dynamicRegistration":true},"documentHighlight":{"dynamicRegistration":true},"documentSymbol":{"dynamicRegistration":true,"symbolKind":{"valueSet":[1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26]},"hierarchicalDocumentSymbolSupport":true},"codeAction":{"dynamicRegistration":true,"isPreferredSupport":true,"codeActionLiteralSupport":{"codeActionKind":{"valueSet":["","quickfix","refactor","refactor.extract","refactor.inline","refactor.rewrite","source","source.organizeImports"]}}},"codeLens":{"dynamicRegistration":true},"formatting":{"dynamicRegistration":true},"rangeFormatting":{"dynamicRegistration":true},"onTypeFormatting":{"dynamicRegistration":true},"rename":{"dynamicRegistration":true,"prepareSupport":true},"documentLink":{"dynamicRegistration":true,"tooltipSupport":true},"typeDefinition":{"dynamicRegistration":true},"implementation":{"dynamicRegistration":true},"declaration":{"dynamicRegistration":true},"colorProvider":{"dynamicRegistration":true},"foldingRange":{"dynamicRegistration":true,"rangeLimit":5000,"lineFoldingOnly":true},"selectionRange":{"dynamicRegistration":true}},"window":{"workDoneProgress":true}},"initializationOptions":{"languageServerHaskell":{}},"trace":"off","workspaceFolders":[{"uri":"file:///home/xps/simple","name":"simple"}],"workDoneToken":"4d59205b-0b69-4688-9810-d0ef6cf83db9"}}
2020-04-21 00:13:32.541179392 [ThreadId 4] - haskell-lsp:initializeRequestHandler: setting current dir to project root:/home/xps/simple
2020-04-21 00:13:32.54128803 [ThreadId 4] - Dummy Cradle file result: /home/xps/simple/File.hs
2020-04-21 00:13:32.541371951 [ThreadId 4] - Found "/home/xps/simple/hie.yaml" for "/home/xps/simple/File.hs"
2020-04-21 00:13:32.542416124 [ThreadId 4] - Module "/home/xps/simple/File.hs" is loaded by Cradle: Cradle {cradleRootDir = "/home/xps/simple", cradleOptsProg = CradleAction: Stack}
2020-04-21 00:13:32.542727022 [ThreadId 4] - Executing Stack GHC with args: --numeric-version
2020-04-21 00:13:32.910932689 [ThreadId 4] - GHC Output: "Just "8.8.3""
2020-04-21 00:13:32.911040761 [ThreadId 9] - Executing Stack GHC with args: --print-libdir
2020-04-21 00:13:32.911294924 [ThreadId 10] - ****** reactor: top of loop
2020-04-21 00:13:32.911431242 [ThreadId 5] - <--2--{"result":{"capabilities":{"typeDefinitionProvider":true,"foldingRangeProvider":false,"textDocumentSync":{"openClose":true,"change":2,"willSave":false,"willSaveWaitUntil":false,"save":{"includeText":false}},"workspace":{},"implementationProvider":true,"documentRangeFormattingProvider":true,"documentHighlightProvider":true,"executeCommandProvider":{"commands":["139505:applyrefact:applyOne","139505:applyrefact:applyAll","139505:generic:type","139505:ghcmod:check","139505:ghcmod:type","139505:ghcmod:casesplit","139505:hsimport:import","139505:package:add","139505:pragmas:addPragma"]},"renameProvider":false,"colorProvider":false,"definitionProvider":true,"hoverProvider":true,"codeActionProvider":true,"completionProvider":{"triggerCharacters":["."],"resolveProvider":true},"documentSymbolProvider":true,"documentFormattingProvider":true,"referencesProvider":true}},"jsonrpc":"2.0","id":0}
2020-04-21 00:13:32.914078971 [ThreadId 4] - ---> {"jsonrpc":"2.0","method":"initialized","params":{}}
2020-04-21 00:13:32.914229892 [ThreadId 10] - ****** reactor: got message number:0
2020-04-21 00:13:32.91429789 [ThreadId 10] - ****** reactor: processing Initialized Notification
2020-04-21 00:13:32.914347343 [ThreadId 10] - ****** reactor: top of loop
2020-04-21 00:13:32.914427324 [ThreadId 5] - <--2--{"jsonrpc":"2.0","params":{"type":4,"message":"Using hie version: Version 1.3, Git revision 78eb87b221481d81b8764c821ab3d673e9768464 (3873 commits) x86_64 ghc-8.8.3"},"method":"window/logMessage"}
2020-04-21 00:13:32.915983863 [ThreadId 4] - ---> {"jsonrpc":"2.0","method":"textDocument/didOpen","params":{"textDocument":{"uri":"file:///home/xps/simple/app/Main.hs","languageId":"haskell","version":1,"text":"module Main where\n\nimport Lib\n\nmain :: IO ()\nmain = foo\n"}}}
2020-04-21 00:13:32.916126698 [ThreadId 10] - ****** reactor: got message number:1
2020-04-21 00:13:32.916178659 [ThreadId 10] - ****** reactor: processing NotDidOpenTextDocument
2020-04-21 00:13:32.916223109 [ThreadId 10] - requestDiagnostics: no diagFunc for:DiagnosticOnOpen
2020-04-21 00:13:32.916256532 [ThreadId 10] - ****** reactor: top of loop
Using hie version: Version 1.3, Git revision 78eb87b221481d81b8764c821ab3d673e9768464 (3873 commits) x86_64 ghc-8.8.3
2020-04-21 00:13:33.296327677 [ThreadId 9] - GHC Output: "Just "/home/xps/.stack/programs/x86_64-linux/ghc-tinfo6-8.8.3/lib/ghc-8.8.3""
2020-04-21 00:13:33.299072653 [ThreadId 15] - ghcDispatcher: top of loop
2020-04-21 00:13:33.299139462 [ThreadId 15] - ghcDispatcher:got request 0 with id: Nothing
2020-04-21 00:13:33.299254376 [ThreadId 15] - ghcDispatcher: top of loop
2020-04-21 00:13:33.299298229 [ThreadId 15] - ghcDispatcher:got request 1 with id: Nothing
2020-04-21 00:13:33.299341932 [ThreadId 15] - ghcDispatcher:Processing request as version matches
2020-04-21 00:13:33.299444148 [ThreadId 15] - New cradle: /home/xps/simple/app/Main.hs
2020-04-21 00:13:33.299764363 [ThreadId 15] - Found "/home/xps/simple/hie.yaml" for "/home/xps/simple/app/Main.hs"
2020-04-21 00:13:33.299502854 [ThreadId 16] - ideDispatcher: top of loop
2020-04-21 00:13:33.299956799 [ThreadId 15] - Module "/home/xps/simple/app/Main.hs" is loaded by Cradle: Cradle {cradleRootDir = "/home/xps/simple", cradleOptsProg = CradleAction: Stack}
2020-04-21 00:13:33.300080816 [ThreadId 5] - <--2--{"jsonrpc":"2.0","params":{"type":4,"message":"Using hoogle db at: /home/xps/.hoogle/default-haskell-5.0.17.hoo"},"method":"window/logMessage"}
2020-04-21 00:13:33.300135949 [ThreadId 15] - Found cradle: Cradle {cradleRootDir = "/home/xps/simple", cradleOptsProg = CradleAction: Stack}
Using hoogle db at: /home/xps/.hoogle/default-haskell-5.0.17.hoo
2020-04-21 00:13:33.300750629 [ThreadId 5] - <--2--{"jsonrpc":"2.0","params":{"token":0},"method":"window/workDoneProgress/create","id":0}
2020-04-21 00:13:33.300852598 [ThreadId 5] - <--2--{"jsonrpc":"2.0","params":{"value":{"kind":"begin","cancellable":false,"title":"Initializing Stack project","percentage":0},"token":0},"method":"$/progress"}
2020-04-21 00:13:33.301704316 [ThreadId 4] - ---> {"jsonrpc":"2.0","id":0,"result":null}
2020-04-21 00:13:33.301783095 [ThreadId 4] - haskell-lsp:Got reply message:"{\"jsonrpc\":\"2.0\",\"id\":0,\"result\":null}"
2020-04-21 00:13:33.301862886 [ThreadId 10] - ****** reactor: got message number:2
2020-04-21 00:13:33.301925945 [ThreadId 10] - reactor:got RspFromClient:ResponseMessage {_jsonrpc = "2.0", _id = IdRspInt 0, _result = Just Null, _error = Nothing}
2020-04-21 00:13:33.301981941 [ThreadId 10] - ****** reactor: top of loop
2020-04-21 00:13:33.730487169 [ThreadId 23] - Using main module: 1. Package `simple' component simple:exe:simple-exe with main-is file: /home/xps/simple/app/Main.hs
2020-04-21 00:13:33.815139993 [ThreadId 23] - Building all executables for `simple' once. After a successful build of all of them, only specified executables will be rebuilt.
2020-04-21 00:13:34.117307878 [ThreadId 23] - simple> configure (lib + exe)
2020-04-21 00:13:34.492821615 [ThreadId 23] - Configuring simple-0.1.0.0...
2020-04-21 00:13:34.693224103 [ThreadId 23] - simple> initial-build-steps (lib + exe)
2020-04-21 00:13:34.79911277 [ThreadId 23] - The following GHC options are incompatible with GHCi and have not been passed to it: -threaded
2020-04-21 00:13:34.799181606 [ThreadId 23] - Configuring GHCi with the following packages: simple
2020-04-21 00:13:35.334439063 [ThreadId 32] - /home/xps/simple/.stack-work/install/x86_64-linux-tinfo6/ebdbb0da9abcdee79623d607831fe92d930efbfbceafe5446f7b69956dd4c872/8.8.3/pkgdb:/home/xps/.stack/snapshots/x86_64-linux-tinfo6/ebdbb0da9abcdee79623d607831fe92d930efbfbceafe5446f7b69956dd4c872/8.8.3/pkgdb:/home/xps/.stack/programs/x86_64-linux/ghc-tinfo6-8.8.3/lib/ghc-8.8.3/package.conf.d
2020-04-21 00:13:35.440377379 [ThreadId 20] - Modules in the cradle: ["/home/xps/simple/src/Lib.hs","/home/xps/simple/app/Main.hs"]
2020-04-21 00:13:35.440480821 [ThreadId 20] - Cradle set succesfully
2020-04-21 00:13:35.440664537 [ThreadId 20] - haskell-lsp:persistFileVFS: Writing virtual file: uri = NormalizedUri 8711931852446917854 "file:///home/xps/simple/app/Main.hs", virtual file = "/tmp/haskell-lsp139505/Main.hs-00000-8711931852446917854.hs"
2020-04-21 00:13:35.458383972 [ThreadId 5] - <--2--{"jsonrpc":"2.0","params":{"value":{"kind":"report","percentage":50,"message":"Lib"},"token":0},"method":"$/progress"}
2020-04-21 00:13:35.458470395 [ThreadId 5] - <--2--{"jsonrpc":"2.0","params":{"value":{"kind":"report","percentage":100,"message":"Main"},"token":0},"method":"$/progress"}
2020-04-21 00:13:35.599716026 [ThreadId 15] - ghcDispatcher: top of loop
2020-04-21 00:13:35.599771638 [ThreadId 15] - ghcDispatcher:got request 1 with id: Nothing
2020-04-21 00:13:35.599832639 [ThreadId 15] - ghcDispatcher:Processing request as version matches
2020-04-21 00:13:35.599936567 [ThreadId 15] - Reusing cradle
2020-04-21 00:13:35.599995629 [ThreadId 15] - setTypecheckedModule: before ghc-mod
2020-04-21 00:13:35.60003837 [ThreadId 15] - Loading file
2020-04-21 00:13:35.600087203 [ThreadId 15] - setTypecheckedModule: before ghc-mod
2020-04-21 00:13:35.600112657 [ThreadId 15] - Loading file
2020-04-21 00:13:35.601910992 [ThreadId 45] - setTargets: [("/home/xps/simple/app/Main.hs","/tmp/haskell-lsp139505/Main.hs-00000-8711931852446917854.hs")]
2020-04-21 00:13:35.601995516 [ThreadId 5] - <--2--{"jsonrpc":"2.0","params":{"value":{"kind":"end"},"token":0},"method":"$/progress"}
2020-04-21 00:13:35.603599041 [ThreadId 45] - modGraph: [ModLocation {ml_hs_file = Just "/home/xps/simple/src/Lib.hs", ml_hi_file = "/home/xps/.cache/hie-bios/14efb41aef54545a9a6d6207b255b12f672dd8bb/Lib.hi", ml_obj_file = "/home/xps/simple/.stack-work/odir/Lib.o", ml_hie_file = "/home/xps/simple/src/Lib.hie"},ModLocation {ml_hs_file = Just "/tmp/haskell-lsp139505/Main.hs-00000-8711931852446917854.hs", ml_hi_file = "/home/xps/.cache/hie-bios/14efb41aef54545a9a6d6207b255b12f672dd8bb/Main.hi", ml_obj_file = "/home/xps/simple/.stack-work/odir/Main.o", ml_hie_file = "/tmp/haskell-lsp139505/Main.hs-00000-8711931852446917854.hie"}]
2020-04-21 00:13:35.603785061 [ThreadId 45] - init-plugins(loaded):0
2020-04-21 00:13:35.603815662 [ThreadId 45] - init-plugins(specified):0
2020-04-21 00:13:35.613372424 [ThreadId 45] - loaded /home/xps/simple/app/Main.hs - /tmp/haskell-lsp139505/Main.hs-00000-8711931852446917854.hs
2020-04-21 00:13:35.61343521 [ThreadId 45] - Typechecked modules for: Just "/tmp/haskell-lsp139505/Main.hs-00000-8711931852446917854.hs"

2020-04-21 00:13:35.624787042 [ThreadId 15] - File, loaded
2020-04-21 00:13:35.624957134 [ThreadId 15] - setTypecheckedModule: after ghc-mod
2020-04-21 00:13:35.624992635 [ThreadId 15] - Diags: fromList []
2020-04-21 00:13:35.625037049 [ThreadId 15] - setTypecheckedModule: Did get typechecked module for: "/home/xps/simple/app/Main.hs"
2020-04-21 00:13:35.626006996 [ThreadId 15] - setTypecheckedModule: done
2020-04-21 00:13:35.626812155 [ThreadId 15] - Diags: [(NormalizedUri 8711931852446917854 "file:///home/xps/simple/app/Main.hs",[])]
2020-04-21 00:13:35.627615436 [ThreadId 15] - ghcDispatcher: top of loop
2020-04-21 00:13:35.721684436 [ThreadId 5] - <--2--{"jsonrpc":"2.0","params":{"uri":"file:///home/xps/simple/app/Main.hs","diagnostics":[]},"method":"textDocument/publishDiagnostics"}
2020-04-21 00:13:35.72181131 [ThreadId 5] - <--2--{"jsonrpc":"2.0","params":{"token":1},"method":"window/workDoneProgress/create","id":1}
2020-04-21 00:13:35.721856495 [ThreadId 5] - <--2--{"jsonrpc":"2.0","params":{"value":{"kind":"begin","cancellable":false,"title":"loading","percentage":0},"token":1},"method":"$/progress"}
2020-04-21 00:13:35.721901041 [ThreadId 5] - <--2--{"jsonrpc":"2.0","params":{"value":{"kind":"report","percentage":50,"message":"Lib"},"token":1},"method":"$/progress"}
2020-04-21 00:13:35.721940534 [ThreadId 5] - <--2--{"jsonrpc":"2.0","params":{"value":{"kind":"report","percentage":100,"message":"Main"},"token":1},"method":"$/progress"}
2020-04-21 00:13:35.721976757 [ThreadId 5] - <--2--{"jsonrpc":"2.0","params":{"value":{"kind":"end"},"token":1},"method":"$/progress"}
2020-04-21 00:13:35.722013496 [ThreadId 5] - <--2--{"jsonrpc":"2.0","params":{"uri":"file:///home/xps/simple/app/Main.hs","diagnostics":[]},"method":"textDocument/publishDiagnostics"}
2020-04-21 00:13:35.7226174 [ThreadId 4] - ---> {"jsonrpc":"2.0","id":1,"result":null}
2020-04-21 00:13:35.722688527 [ThreadId 4] - haskell-lsp:Got reply message:"{\"jsonrpc\":\"2.0\",\"id\":1,\"result\":null}"
2020-04-21 00:13:35.722757988 [ThreadId 10] - ****** reactor: got message number:3
2020-04-21 00:13:35.722814349 [ThreadId 10] - reactor:got RspFromClient:ResponseMessage {_jsonrpc = "2.0", _id = IdRspInt 1, _result = Just Null, _error = Nothing}
2020-04-21 00:13:35.722863363 [ThreadId 10] - ****** reactor: top of loop
2020-04-21 00:13:41.131370057 [ThreadId 4] - ---> {"jsonrpc":"2.0","id":1,"method":"textDocument/definition","params":{"textDocument":{"uri":"file:///home/xps/simple/app/Main.hs"},"position":{"line":5,"character":9}}}
2020-04-21 00:13:41.131514571 [ThreadId 10] - ****** reactor: got message number:4
2020-04-21 00:13:41.131561111 [ThreadId 10] - reactor:got DefinitionRequest:RequestMessage {_jsonrpc = "2.0", _id = IdInt 1, _method = TextDocumentDefinition, _params = TextDocumentPositionParams {_textDocument = TextDocumentIdentifier {_uri = Uri {getUri = "file:///home/xps/simple/app/Main.hs"}}, _position = Position {_line = 5, _character = 9}, _workDoneToken = Nothing}}
2020-04-21 00:13:41.131604817 [ThreadId 10] - ****** reactor: top of loop
2020-04-21 00:13:41.131636647 [ThreadId 16] - ideDispatcher: got request 4 with id: IdInt 1
2020-04-21 00:13:41.132019186 [ThreadId 16] - ideDispatcher: top of loop
2020-04-21 00:13:41.132079203 [ThreadId 5] - <--2--{"result":[],"jsonrpc":"2.0","id":1}

Log from second scenario:

## versions

vim version: NVIM v0.4.3
node version: v13.13.0
coc.nvim version: 0.0.77-817efd5108
term: screen
platform: linux

## Output channel: snippets

[Info 12:15:00 AM] Using ultisnips directories: UltiSnips /home/xps/.config/coc/ultisnips
[Info 12:15:00 AM] Using ultisnips python command: pyx

## Output channel: languageserver.haskell

2020-04-21 00:15:02.936280156 [ThreadId 4] - run entered for hie-wrapper(hie-wrapper) Version 1.3, Git revision 78eb87b221481d81b8764c821ab3d673e9768464 (3873 commits) x86_64 ghc-8.8.3
2020-04-21 00:15:02.936437414 [ThreadId 4] - Current directory:/home/xps/simple
2020-04-21 00:15:02.936476747 [ThreadId 4] - Operating system:linux
2020-04-21 00:15:02.936503617 [ThreadId 4] - args:["--lsp","--debug"]
2020-04-21 00:15:02.936587426 [ThreadId 4] - Found "/home/xps/simple/hie.yaml" for "/home/xps/simple/File.hs"
2020-04-21 00:15:02.936823012 [ThreadId 4] - Module "/home/xps/simple/File.hs" is loaded by Cradle: Cradle {cradleRootDir = "/home/xps/simple", cradleOptsProg = CradleAction: Stack}
2020-04-21 00:15:02.936870037 [ThreadId 4] - Cradle directory:/home/xps/simple
2020-04-21 00:15:02.936958318 [ThreadId 4] - Executing Stack GHC with args: --numeric-version
2020-04-21 00:15:03.312239639 [ThreadId 4] - GHC Output: "Just "8.8.3""
2020-04-21 00:15:03.312321605 [ThreadId 4] - Project GHC version:8.8.3
2020-04-21 00:15:03.312358309 [ThreadId 4] - hie exe candidates :["hie-8.8.3","hie-8.8","hie"]
2020-04-21 00:15:03.312662415 [ThreadId 4] - found hie exe at:/usr/bin/hie-8.8.3
2020-04-21 00:15:03.312701475 [ThreadId 4] - args:["--lsp","--debug"]
2020-04-21 00:15:03.312748311 [ThreadId 4] - launching ....

2020-04-21 00:15:03.315993595 [ThreadId 4] - Run entered for HIE(hie-8.8.3) Version 1.3, Git revision 78eb87b221481d81b8764c821ab3d673e9768464 (3873 commits) x86_64 ghc-8.8.3
2020-04-21 00:15:03.316231897 [ThreadId 4] - Operating as a LSP server on stdio
2020-04-21 00:15:03.316288273 [ThreadId 4] - Current directory:/home/xps/simple
2020-04-21 00:15:03.316331339 [ThreadId 4] - Operating system:linux
2020-04-21 00:15:03.316377084 [ThreadId 4] - args:["--lsp","--debug"]
2020-04-21 00:15:03.316497248 [ThreadId 4] - 

haskell-lsp:Starting up server ...
2020-04-21 00:15:03.316861168 [ThreadId 4] - ---> {"jsonrpc":"2.0","id":0,"method":"initialize","params":{"processId":139936,"rootPath":"/home/xps/simple","rootUri":"file:///home/xps/simple","capabilities":{"workspace":{"applyEdit":true,"workspaceEdit":{"documentChanges":true,"resourceOperations":["create","rename","delete"],"failureHandling":"textOnlyTransactional"},"didChangeConfiguration":{"dynamicRegistration":true},"didChangeWatchedFiles":{"dynamicRegistration":true},"symbol":{"dynamicRegistration":true,"symbolKind":{"valueSet":[1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26]}},"executeCommand":{"dynamicRegistration":true},"configuration":true,"workspaceFolders":true},"textDocument":{"publishDiagnostics":{"relatedInformation":true,"versionSupport":false},"synchronization":{"dynamicRegistration":true,"willSave":true,"willSaveWaitUntil":true,"didSave":true},"completion":{"dynamicRegistration":true,"contextSupport":true,"completionItem":{"snippetSupport":true,"commitCharactersSupport":true,"documentationFormat":["markdown","plaintext"],"deprecatedSupport":true,"preselectSupport":true},"completionItemKind":{"valueSet":[1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25]}},"hover":{"dynamicRegistration":true,"contentFormat":["markdown","plaintext"]},"signatureHelp":{"dynamicRegistration":true,"signatureInformation":{"documentationFormat":["markdown","plaintext"],"parameterInformation":{"labelOffsetSupport":true}}},"definition":{"dynamicRegistration":true},"references":{"dynamicRegistration":true},"documentHighlight":{"dynamicRegistration":true},"documentSymbol":{"dynamicRegistration":true,"symbolKind":{"valueSet":[1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26]},"hierarchicalDocumentSymbolSupport":true},"codeAction":{"dynamicRegistration":true,"isPreferredSupport":true,"codeActionLiteralSupport":{"codeActionKind":{"valueSet":["","quickfix","refactor","refactor.extract","refactor.inline","refactor.rewrite","source","source.organizeImports"]}}},"codeLens":{"dynamicRegistration":true},"formatting":{"dynamicRegistration":true},"rangeFormatting":{"dynamicRegistration":true},"onTypeFormatting":{"dynamicRegistration":true},"rename":{"dynamicRegistration":true,"prepareSupport":true},"documentLink":{"dynamicRegistration":true,"tooltipSupport":true},"typeDefinition":{"dynamicRegistration":true},"implementation":{"dynamicRegistration":true},"declaration":{"dynamicRegistration":true},"colorProvider":{"dynamicRegistration":true},"foldingRange":{"dynamicRegistration":true,"rangeLimit":5000,"lineFoldingOnly":true},"selectionRange":{"dynamicRegistration":true}},"window":{"workDoneProgress":true}},"initializationOptions":{"languageServerHaskell":{}},"trace":"off","workspaceFolders":[{"uri":"file:///home/xps/simple","name":"simple"}],"workDoneToken":"f6289500-4ef9-4d9c-83b1-46f1a9ff44f4"}}
2020-04-21 00:15:03.31839738 [ThreadId 4] - haskell-lsp:initializeRequestHandler: setting current dir to project root:/home/xps/simple
2020-04-21 00:15:03.318535685 [ThreadId 4] - Dummy Cradle file result: /home/xps/simple/File.hs
2020-04-21 00:15:03.318660626 [ThreadId 4] - Found "/home/xps/simple/hie.yaml" for "/home/xps/simple/File.hs"
2020-04-21 00:15:03.318876581 [ThreadId 4] - Module "/home/xps/simple/File.hs" is loaded by Cradle: Cradle {cradleRootDir = "/home/xps/simple", cradleOptsProg = CradleAction: Stack}
2020-04-21 00:15:03.318979734 [ThreadId 4] - Executing Stack GHC with args: --numeric-version
2020-04-21 00:15:03.693633979 [ThreadId 4] - GHC Output: "Just "8.8.3""
2020-04-21 00:15:03.693809176 [ThreadId 9] - Executing Stack GHC with args: --print-libdir
2020-04-21 00:15:03.694225353 [ThreadId 10] - ****** reactor: top of loop
2020-04-21 00:15:03.694407827 [ThreadId 5] - <--2--{"result":{"capabilities":{"typeDefinitionProvider":true,"foldingRangeProvider":false,"textDocumentSync":{"openClose":true,"change":2,"willSave":false,"willSaveWaitUntil":false,"save":{"includeText":false}},"workspace":{},"implementationProvider":true,"documentRangeFormattingProvider":true,"documentHighlightProvider":true,"executeCommandProvider":{"commands":["139988:applyrefact:applyOne","139988:applyrefact:applyAll","139988:generic:type","139988:ghcmod:check","139988:ghcmod:type","139988:ghcmod:casesplit","139988:hsimport:import","139988:package:add","139988:pragmas:addPragma"]},"renameProvider":false,"colorProvider":false,"definitionProvider":true,"hoverProvider":true,"codeActionProvider":true,"completionProvider":{"triggerCharacters":["."],"resolveProvider":true},"documentSymbolProvider":true,"documentFormattingProvider":true,"referencesProvider":true}},"jsonrpc":"2.0","id":0}
2020-04-21 00:15:03.697185308 [ThreadId 4] - ---> {"jsonrpc":"2.0","method":"initialized","params":{}}
2020-04-21 00:15:03.697315432 [ThreadId 10] - ****** reactor: got message number:0
2020-04-21 00:15:03.697379077 [ThreadId 10] - ****** reactor: processing Initialized Notification
2020-04-21 00:15:03.697428737 [ThreadId 10] - ****** reactor: top of loop
2020-04-21 00:15:03.697526713 [ThreadId 5] - <--2--{"jsonrpc":"2.0","params":{"type":4,"message":"Using hie version: Version 1.3, Git revision 78eb87b221481d81b8764c821ab3d673e9768464 (3873 commits) x86_64 ghc-8.8.3"},"method":"window/logMessage"}
2020-04-21 00:15:03.69878304 [ThreadId 4] - ---> {"jsonrpc":"2.0","method":"textDocument/didOpen","params":{"textDocument":{"uri":"file:///home/xps/simple/src/Lib.hs","languageId":"haskell","version":1,"text":"module Lib where\n\nfoo :: IO ()\nfoo = putStrLn \"foo\"\n\n-- bar :: IO ()\n-- bar = putStrLn \"bar\"\n\n"}}}
2020-04-21 00:15:03.698944107 [ThreadId 10] - ****** reactor: got message number:1
2020-04-21 00:15:03.699008411 [ThreadId 10] - ****** reactor: processing NotDidOpenTextDocument
2020-04-21 00:15:03.699059273 [ThreadId 10] - requestDiagnostics: no diagFunc for:DiagnosticOnOpen
2020-04-21 00:15:03.699097603 [ThreadId 10] - ****** reactor: top of loop
Using hie version: Version 1.3, Git revision 78eb87b221481d81b8764c821ab3d673e9768464 (3873 commits) x86_64 ghc-8.8.3
2020-04-21 00:15:04.084822542 [ThreadId 9] - GHC Output: "Just "/home/xps/.stack/programs/x86_64-linux/ghc-tinfo6-8.8.3/lib/ghc-8.8.3""
2020-04-21 00:15:04.08765486 [ThreadId 15] - ghcDispatcher: top of loop
2020-04-21 00:15:04.087706171 [ThreadId 15] - ghcDispatcher:got request 0 with id: Nothing
2020-04-21 00:15:04.087774909 [ThreadId 15] - ghcDispatcher: top of loop
2020-04-21 00:15:04.087806958 [ThreadId 15] - ghcDispatcher:got request 1 with id: Nothing
2020-04-21 00:15:04.087836388 [ThreadId 15] - ghcDispatcher:Processing request as version matches
2020-04-21 00:15:04.087977567 [ThreadId 15] - New cradle: /home/xps/simple/src/Lib.hs
2020-04-21 00:15:04.087924005 [ThreadId 16] - ideDispatcher: top of loop
2020-04-21 00:15:04.088217378 [ThreadId 15] - Found "/home/xps/simple/hie.yaml" for "/home/xps/simple/src/Lib.hs"
2020-04-21 00:15:04.088307016 [ThreadId 5] - <--2--{"jsonrpc":"2.0","params":{"type":4,"message":"Using hoogle db at: /home/xps/.hoogle/default-haskell-5.0.17.hoo"},"method":"window/logMessage"}
2020-04-21 00:15:04.088415902 [ThreadId 15] - Module "/home/xps/simple/src/Lib.hs" is loaded by Cradle: Cradle {cradleRootDir = "/home/xps/simple", cradleOptsProg = CradleAction: Stack}
2020-04-21 00:15:04.088466488 [ThreadId 15] - Found cradle: Cradle {cradleRootDir = "/home/xps/simple", cradleOptsProg = CradleAction: Stack}
Using hoogle db at: /home/xps/.hoogle/default-haskell-5.0.17.hoo
2020-04-21 00:15:04.089041476 [ThreadId 5] - <--2--{"jsonrpc":"2.0","params":{"token":0},"method":"window/workDoneProgress/create","id":0}
2020-04-21 00:15:04.08923292 [ThreadId 5] - <--2--{"jsonrpc":"2.0","params":{"value":{"kind":"begin","cancellable":false,"title":"Initializing Stack project","percentage":0},"token":0},"method":"$/progress"}
2020-04-21 00:15:04.089417946 [ThreadId 4] - ---> {"jsonrpc":"2.0","id":0,"result":null}
2020-04-21 00:15:04.089469792 [ThreadId 4] - haskell-lsp:Got reply message:"{\"jsonrpc\":\"2.0\",\"id\":0,\"result\":null}"
2020-04-21 00:15:04.089534428 [ThreadId 10] - ****** reactor: got message number:2
2020-04-21 00:15:04.089566052 [ThreadId 10] - reactor:got RspFromClient:ResponseMessage {_jsonrpc = "2.0", _id = IdRspInt 0, _result = Just Null, _error = Nothing}
2020-04-21 00:15:04.089604755 [ThreadId 10] - ****** reactor: top of loop
2020-04-21 00:15:04.520801157 [ThreadId 23] - Using main module: 1. Package `simple' component simple:exe:simple-exe with main-is file: /home/xps/simple/app/Main.hs
2020-04-21 00:15:04.603490321 [ThreadId 23] - Building all executables for `simple' once. After a successful build of all of them, only specified executables will be rebuilt.
2020-04-21 00:15:04.678990997 [ThreadId 23] - simple> configure (lib + exe)
2020-04-21 00:15:05.053204377 [ThreadId 23] - Configuring simple-0.1.0.0...
2020-04-21 00:15:05.279789598 [ThreadId 23] - simple> initial-build-steps (lib + exe)
2020-04-21 00:15:05.384251907 [ThreadId 23] - The following GHC options are incompatible with GHCi and have not been passed to it: -threaded
2020-04-21 00:15:05.384329707 [ThreadId 23] - Configuring GHCi with the following packages: simple
2020-04-21 00:15:05.92349479 [ThreadId 32] - /home/xps/simple/.stack-work/install/x86_64-linux-tinfo6/ebdbb0da9abcdee79623d607831fe92d930efbfbceafe5446f7b69956dd4c872/8.8.3/pkgdb:/home/xps/.stack/snapshots/x86_64-linux-tinfo6/ebdbb0da9abcdee79623d607831fe92d930efbfbceafe5446f7b69956dd4c872/8.8.3/pkgdb:/home/xps/.stack/programs/x86_64-linux/ghc-tinfo6-8.8.3/lib/ghc-8.8.3/package.conf.d
2020-04-21 00:15:06.058760886 [ThreadId 20] - Modules in the cradle: ["/home/xps/simple/src/Lib.hs","/home/xps/simple/app/Main.hs"]
2020-04-21 00:15:06.058884747 [ThreadId 20] - Cradle set succesfully
2020-04-21 00:15:06.059073919 [ThreadId 20] - haskell-lsp:persistFileVFS: Writing virtual file: uri = NormalizedUri (-4512905862535020785) "file:///home/xps/simple/src/Lib.hs", virtual file = "/tmp/haskell-lsp139988/Lib.hs-00000--4512905862535020785.hs"
2020-04-21 00:15:06.076300401 [ThreadId 5] - <--2--{"jsonrpc":"2.0","params":{"value":{"kind":"report","percentage":50,"message":"Lib"},"token":0},"method":"$/progress"}
2020-04-21 00:15:06.076383468 [ThreadId 5] - <--2--{"jsonrpc":"2.0","params":{"value":{"kind":"report","percentage":100,"message":"Main"},"token":0},"method":"$/progress"}
2020-04-21 00:15:06.220443763 [ThreadId 15] - ghcDispatcher: top of loop
2020-04-21 00:15:06.220501743 [ThreadId 15] - ghcDispatcher:got request 1 with id: Nothing
2020-04-21 00:15:06.220564946 [ThreadId 15] - ghcDispatcher:Processing request as version matches
2020-04-21 00:15:06.220669055 [ThreadId 15] - Reusing cradle
2020-04-21 00:15:06.220729163 [ThreadId 15] - setTypecheckedModule: before ghc-mod
2020-04-21 00:15:06.220771599 [ThreadId 15] - Loading file
2020-04-21 00:15:06.220820026 [ThreadId 15] - setTypecheckedModule: before ghc-mod
2020-04-21 00:15:06.220844773 [ThreadId 15] - Loading file
2020-04-21 00:15:06.222634845 [ThreadId 45] - setTargets: [("/home/xps/simple/src/Lib.hs","/tmp/haskell-lsp139988/Lib.hs-00000--4512905862535020785.hs")]
2020-04-21 00:15:06.222733453 [ThreadId 5] - <--2--{"jsonrpc":"2.0","params":{"value":{"kind":"end"},"token":0},"method":"$/progress"}
2020-04-21 00:15:06.224269626 [ThreadId 45] - modGraph: [ModLocation {ml_hs_file = Just "/tmp/haskell-lsp139988/Lib.hs-00000--4512905862535020785.hs", ml_hi_file = "/home/xps/.cache/hie-bios/14efb41aef54545a9a6d6207b255b12f672dd8bb/Lib.hi", ml_obj_file = "/home/xps/simple/.stack-work/odir/Lib.o", ml_hie_file = "/tmp/haskell-lsp139988/Lib.hs-00000--4512905862535020785.hie"}]
2020-04-21 00:15:06.225034899 [ThreadId 45] - init-plugins(loaded):0
2020-04-21 00:15:06.225072341 [ThreadId 45] - init-plugins(specified):0
2020-04-21 00:15:06.265723704 [ThreadId 45] - loaded /home/xps/simple/src/Lib.hs - /tmp/haskell-lsp139988/Lib.hs-00000--4512905862535020785.hs
2020-04-21 00:15:06.26580484 [ThreadId 45] - Typechecked modules for: Just "/tmp/haskell-lsp139988/Lib.hs-00000--4512905862535020785.hs"

2020-04-21 00:15:06.287055633 [ThreadId 15] - File, loaded
2020-04-21 00:15:06.287194664 [ThreadId 15] - setTypecheckedModule: after ghc-mod
2020-04-21 00:15:06.287251289 [ThreadId 15] - Diags: fromList []
2020-04-21 00:15:06.287285379 [ThreadId 15] - setTypecheckedModule: Did get typechecked module for: "/home/xps/simple/src/Lib.hs"
2020-04-21 00:15:06.287513748 [ThreadId 15] - setTypecheckedModule: done
2020-04-21 00:15:06.28760978 [ThreadId 15] - Diags: [(NormalizedUri (-4512905862535020785) "file:///home/xps/simple/src/Lib.hs",[])]
2020-04-21 00:15:06.287654963 [ThreadId 15] - ghcDispatcher: top of loop
2020-04-21 00:15:06.357732533 [ThreadId 5] - <--2--{"jsonrpc":"2.0","params":{"uri":"file:///home/xps/simple/src/Lib.hs","diagnostics":[]},"method":"textDocument/publishDiagnostics"}
2020-04-21 00:15:06.357806511 [ThreadId 5] - <--2--{"jsonrpc":"2.0","params":{"token":1},"method":"window/workDoneProgress/create","id":1}
2020-04-21 00:15:06.357852674 [ThreadId 5] - <--2--{"jsonrpc":"2.0","params":{"value":{"kind":"begin","cancellable":false,"title":"loading","percentage":0},"token":1},"method":"$/progress"}
2020-04-21 00:15:06.357898651 [ThreadId 5] - <--2--{"jsonrpc":"2.0","params":{"value":{"kind":"report","percentage":100,"message":"Lib"},"token":1},"method":"$/progress"}
2020-04-21 00:15:06.357936142 [ThreadId 5] - <--2--{"jsonrpc":"2.0","params":{"value":{"kind":"end"},"token":1},"method":"$/progress"}
2020-04-21 00:15:06.357975001 [ThreadId 5] - <--2--{"jsonrpc":"2.0","params":{"uri":"file:///home/xps/simple/src/Lib.hs","diagnostics":[]},"method":"textDocument/publishDiagnostics"}
2020-04-21 00:15:06.358700307 [ThreadId 4] - ---> {"jsonrpc":"2.0","id":1,"result":null}
2020-04-21 00:15:06.35874962 [ThreadId 4] - haskell-lsp:Got reply message:"{\"jsonrpc\":\"2.0\",\"id\":1,\"result\":null}"
2020-04-21 00:15:06.358792389 [ThreadId 10] - ****** reactor: got message number:3
2020-04-21 00:15:06.358828653 [ThreadId 10] - reactor:got RspFromClient:ResponseMessage {_jsonrpc = "2.0", _id = IdRspInt 1, _result = Just Null, _error = Nothing}
2020-04-21 00:15:06.358864519 [ThreadId 10] - ****** reactor: top of loop
2020-04-21 00:15:07.996079157 [ThreadId 4] - ---> {"jsonrpc":"2.0","method":"textDocument/didChange","params":{"textDocument":{"version":2,"uri":"file:///home/xps/simple/src/Lib.hs"},"contentChanges":[{"range":{"start":{"line":3,"character":20},"end":{"line":6,"character":23}},"rangeLength":41,"text":""}]}}
2020-04-21 00:15:07.99625682 [ThreadId 10] - ****** reactor: got message number:4
2020-04-21 00:15:07.996290482 [ThreadId 10] - ****** reactor: processing NotDidChangeTextDocument
2020-04-21 00:15:07.996320418 [ThreadId 10] - ****** reactor: top of loop
2020-04-21 00:15:07.99634734 [ThreadId 15] - ghcDispatcher:got request 4 with id: Nothing
2020-04-21 00:15:07.996448492 [ThreadId 15] - Reusing cradle
2020-04-21 00:15:07.996563719 [ThreadId 15] - ghcDispatcher: top of loop
2020-04-21 00:15:08.347474191 [ThreadId 15] - ghcDispatcher:got request 4 with id: Nothing
2020-04-21 00:15:08.347554157 [ThreadId 15] - ghcDispatcher:Processing request as version matches
2020-04-21 00:15:08.347673356 [ThreadId 15] - Reusing cradle
2020-04-21 00:15:08.347835428 [ThreadId 15] - haskell-lsp:persistFileVFS: Writing virtual file: uri = NormalizedUri (-4512905862535020785) "file:///home/xps/simple/src/Lib.hs", virtual file = "/tmp/haskell-lsp139988/Lib.hs-00001--4512905862535020785.hs"
2020-04-21 00:15:08.347471213 [ThreadId 6] - requestDiagnostics: no diagFunc for:DiagnosticOnChange
2020-04-21 00:15:08.467257653 [ThreadId 15] - ghcDispatcher: top of loop
2020-04-21 00:15:08.467313421 [ThreadId 15] - ghcDispatcher:got request 4 with id: Nothing
2020-04-21 00:15:08.467375379 [ThreadId 15] - ghcDispatcher:Processing request as version matches
2020-04-21 00:15:08.467456311 [ThreadId 15] - Reusing cradle
2020-04-21 00:15:08.467515722 [ThreadId 15] - setTypecheckedModule: before ghc-mod
2020-04-21 00:15:08.467559035 [ThreadId 15] - Loading file
2020-04-21 00:15:08.467589743 [ThreadId 15] - setTypecheckedModule: before ghc-mod
2020-04-21 00:15:08.467626134 [ThreadId 15] - Loading file
2020-04-21 00:15:08.475238765 [ThreadId 54] - setTargets: [("/home/xps/simple/src/Lib.hs","/tmp/haskell-lsp139988/Lib.hs-00001--4512905862535020785.hs")]
2020-04-21 00:15:08.475786035 [ThreadId 54] - modGraph: [ModLocation {ml_hs_file = Just "/tmp/haskell-lsp139988/Lib.hs-00001--4512905862535020785.hs", ml_hi_file = "/home/xps/.cache/hie-bios/14efb41aef54545a9a6d6207b255b12f672dd8bb/Lib.hi", ml_obj_file = "/home/xps/simple/.stack-work/odir/Lib.o", ml_hie_file = "/tmp/haskell-lsp139988/Lib.hs-00001--4512905862535020785.hie"}]
2020-04-21 00:15:08.475895806 [ThreadId 54] - init-plugins(loaded):0
2020-04-21 00:15:08.475926116 [ThreadId 54] - init-plugins(specified):0
2020-04-21 00:15:08.476509283 [ThreadId 54] - loaded /home/xps/simple/src/Lib.hs - /tmp/haskell-lsp139988/Lib.hs-00001--4512905862535020785.hs
2020-04-21 00:15:08.476564837 [ThreadId 54] - Typechecked modules for: Just "/tmp/haskell-lsp139988/Lib.hs-00001--4512905862535020785.hs"

2020-04-21 00:15:08.478502399 [ThreadId 15] - File, loaded
2020-04-21 00:15:08.478888321 [ThreadId 15] - setTypecheckedModule: after ghc-mod
2020-04-21 00:15:08.478918101 [ThreadId 15] - Diags: fromList []
2020-04-21 00:15:08.478966225 [ThreadId 15] - setTypecheckedModule: Did get typechecked module for: "/home/xps/simple/src/Lib.hs"
2020-04-21 00:15:08.479136632 [ThreadId 15] - setTypecheckedModule: done
2020-04-21 00:15:08.479227683 [ThreadId 15] - Diags: [(NormalizedUri (-4512905862535020785) "file:///home/xps/simple/src/Lib.hs",[])]
2020-04-21 00:15:08.47927283 [ThreadId 15] - ghcDispatcher: top of loop
2020-04-21 00:15:08.489832199 [ThreadId 5] - <--2--{"jsonrpc":"2.0","params":{"uri":"file:///home/xps/simple/src/Lib.hs","diagnostics":[]},"method":"textDocument/publishDiagnostics"}
2020-04-21 00:15:08.489928824 [ThreadId 5] - <--2--{"jsonrpc":"2.0","params":{"token":2},"method":"window/workDoneProgress/create","id":2}
2020-04-21 00:15:08.490005815 [ThreadId 5] - <--2--{"jsonrpc":"2.0","params":{"value":{"kind":"begin","cancellable":false,"title":"loading","percentage":0},"token":2},"method":"$/progress"}
2020-04-21 00:15:08.490062305 [ThreadId 5] - <--2--{"jsonrpc":"2.0","params":{"value":{"kind":"report","percentage":100,"message":"Lib"},"token":2},"method":"$/progress"}
2020-04-21 00:15:08.490110096 [ThreadId 5] - <--2--{"jsonrpc":"2.0","params":{"value":{"kind":"end"},"token":2},"method":"$/progress"}
2020-04-21 00:15:08.490157273 [ThreadId 5] - <--2--{"jsonrpc":"2.0","params":{"uri":"file:///home/xps/simple/src/Lib.hs","diagnostics":[]},"method":"textDocument/publishDiagnostics"}
2020-04-21 00:15:08.490667517 [ThreadId 4] - ---> {"jsonrpc":"2.0","id":2,"result":null}
2020-04-21 00:15:08.490747476 [ThreadId 4] - haskell-lsp:Got reply message:"{\"jsonrpc\":\"2.0\",\"id\":2,\"result\":null}"
2020-04-21 00:15:08.490821134 [ThreadId 10] - ****** reactor: got message number:5
2020-04-21 00:15:08.490877727 [ThreadId 10] - reactor:got RspFromClient:ResponseMessage {_jsonrpc = "2.0", _id = IdRspInt 2, _result = Just Null, _error = Nothing}
2020-04-21 00:15:08.490963524 [ThreadId 10] - ****** reactor: top of loop
2020-04-21 00:15:12.386341892 [ThreadId 4] - ---> {"jsonrpc":"2.0","method":"textDocument/didOpen","params":{"textDocument":{"uri":"file:///home/xps/simple/app/Main.hs","languageId":"haskell","version":1,"text":"module Main where\n\nimport Lib\n\nmain :: IO ()\nmain = foo\n"}}}
2020-04-21 00:15:12.386559225 [ThreadId 10] - ****** reactor: got message number:6
2020-04-21 00:15:12.386605953 [ThreadId 10] - ****** reactor: processing NotDidOpenTextDocument
2020-04-21 00:15:12.386643689 [ThreadId 10] - requestDiagnostics: no diagFunc for:DiagnosticOnOpen
2020-04-21 00:15:12.386689641 [ThreadId 10] - ****** reactor: top of loop
2020-04-21 00:15:12.386724632 [ThreadId 15] - ghcDispatcher:got request 6 with id: Nothing
2020-04-21 00:15:12.386748703 [ThreadId 15] - ghcDispatcher:Processing request as version matches
2020-04-21 00:15:12.38683481 [ThreadId 15] - Reusing cradle
2020-04-21 00:15:12.386965829 [ThreadId 15] - haskell-lsp:persistFileVFS: Writing virtual file: uri = NormalizedUri 8711931852446917854 "file:///home/xps/simple/app/Main.hs", virtual file = "/tmp/haskell-lsp139988/Main.hs-00000-8711931852446917854.hs"
2020-04-21 00:15:12.508693524 [ThreadId 15] - ghcDispatcher: top of loop
2020-04-21 00:15:12.508750535 [ThreadId 15] - ghcDispatcher:got request 6 with id: Nothing
2020-04-21 00:15:12.508812729 [ThreadId 15] - ghcDispatcher:Processing request as version matches
2020-04-21 00:15:12.508912109 [ThreadId 15] - Reusing cradle
2020-04-21 00:15:12.508971025 [ThreadId 15] - setTypecheckedModule: before ghc-mod
2020-04-21 00:15:12.509013775 [ThreadId 15] - Loading file
2020-04-21 00:15:12.509062838 [ThreadId 15] - setTypecheckedModule: before ghc-mod
2020-04-21 00:15:12.509087156 [ThreadId 15] - Loading file
2020-04-21 00:15:12.51098506 [ThreadId 58] - setTargets: [("/home/xps/simple/app/Main.hs","/tmp/haskell-lsp139988/Main.hs-00000-8711931852446917854.hs")]
2020-04-21 00:15:12.514094339 [ThreadId 58] - modGraph: [ModLocation {ml_hs_file = Just "/tmp/haskell-lsp139988/Lib.hs-00001--4512905862535020785.hs", ml_hi_file = "/home/xps/.cache/hie-bios/14efb41aef54545a9a6d6207b255b12f672dd8bb/Lib.hi", ml_obj_file = "/home/xps/simple/.stack-work/odir/Lib.o", ml_hie_file = "/tmp/haskell-lsp139988/Lib.hs-00001--4512905862535020785.hie"},ModLocation {ml_hs_file = Just "/tmp/haskell-lsp139988/Main.hs-00000-8711931852446917854.hs", ml_hi_file = "/home/xps/.cache/hie-bios/14efb41aef54545a9a6d6207b255b12f672dd8bb/Main.hi", ml_obj_file = "/home/xps/simple/.stack-work/odir/Main.o", ml_hie_file = "/tmp/haskell-lsp139988/Main.hs-00000-8711931852446917854.hie"}]
2020-04-21 00:15:12.514697995 [ThreadId 58] - init-plugins(loaded):0
2020-04-21 00:15:12.514733444 [ThreadId 58] - init-plugins(specified):0
2020-04-21 00:15:12.517289473 [ThreadId 58] - loaded /home/xps/simple/app/Main.hs - /tmp/haskell-lsp139988/Main.hs-00000-8711931852446917854.hs
2020-04-21 00:15:12.51739919 [ThreadId 58] - Typechecked modules for: Just "/tmp/haskell-lsp139988/Main.hs-00000-8711931852446917854.hs"

2020-04-21 00:15:12.527501856 [ThreadId 15] - File, loaded
2020-04-21 00:15:12.527990773 [ThreadId 15] - setTypecheckedModule: after ghc-mod
2020-04-21 00:15:12.528033588 [ThreadId 15] - Diags: fromList []
2020-04-21 00:15:12.528668449 [ThreadId 15] - setTypecheckedModule: Did get typechecked module for: "/home/xps/simple/app/Main.hs"
2020-04-21 00:15:12.528887543 [ThreadId 15] - setTypecheckedModule: done
2020-04-21 00:15:12.528983084 [ThreadId 15] - Diags: [(NormalizedUri 8711931852446917854 "file:///home/xps/simple/app/Main.hs",[])]
2020-04-21 00:15:12.529027872 [ThreadId 15] - ghcDispatcher: top of loop
2020-04-21 00:15:12.535830457 [ThreadId 5] - <--2--{"jsonrpc":"2.0","params":{"uri":"file:///home/xps/simple/app/Main.hs","diagnostics":[]},"method":"textDocument/publishDiagnostics"}
2020-04-21 00:15:12.535900248 [ThreadId 5] - <--2--{"jsonrpc":"2.0","params":{"token":3},"method":"window/workDoneProgress/create","id":3}
2020-04-21 00:15:12.53594216 [ThreadId 5] - <--2--{"jsonrpc":"2.0","params":{"value":{"kind":"begin","cancellable":false,"title":"loading","percentage":0},"token":3},"method":"$/progress"}
2020-04-21 00:15:12.535987744 [ThreadId 5] - <--2--{"jsonrpc":"2.0","params":{"value":{"kind":"report","percentage":100,"message":"Main"},"token":3},"method":"$/progress"}
2020-04-21 00:15:12.536025835 [ThreadId 5] - <--2--{"jsonrpc":"2.0","params":{"value":{"kind":"end"},"token":3},"method":"$/progress"}
2020-04-21 00:15:12.536065286 [ThreadId 5] - <--2--{"jsonrpc":"2.0","params":{"uri":"file:///home/xps/simple/app/Main.hs","diagnostics":[]},"method":"textDocument/publishDiagnostics"}
2020-04-21 00:15:12.536568858 [ThreadId 4] - ---> {"jsonrpc":"2.0","id":3,"result":null}
2020-04-21 00:15:12.536618764 [ThreadId 4] - haskell-lsp:Got reply message:"{\"jsonrpc\":\"2.0\",\"id\":3,\"result\":null}"
2020-04-21 00:15:12.536664616 [ThreadId 10] - ****** reactor: got message number:7
2020-04-21 00:15:12.536691862 [ThreadId 10] - reactor:got RspFromClient:ResponseMessage {_jsonrpc = "2.0", _id = IdRspInt 3, _result = Just Null, _error = Nothing}
2020-04-21 00:15:12.536718654 [ThreadId 10] - ****** reactor: top of loop
2020-04-21 00:15:14.237208917 [ThreadId 4] - ---> {"jsonrpc":"2.0","id":1,"method":"textDocument/definition","params":{"textDocument":{"uri":"file:///home/xps/simple/app/Main.hs"},"position":{"line":5,"character":9}}}
2020-04-21 00:15:14.237393234 [ThreadId 10] - ****** reactor: got message number:8
2020-04-21 00:15:14.237453989 [ThreadId 10] - reactor:got DefinitionRequest:RequestMessage {_jsonrpc = "2.0", _id = IdInt 1, _method = TextDocumentDefinition, _params = TextDocumentPositionParams {_textDocument = TextDocumentIdentifier {_uri = Uri {getUri = "file:///home/xps/simple/app/Main.hs"}}, _position = Position {_line = 5, _character = 9}, _workDoneToken = Nothing}}
2020-04-21 00:15:14.237516053 [ThreadId 10] - ****** reactor: top of loop
2020-04-21 00:15:14.237560971 [ThreadId 16] - ideDispatcher: got request 8 with id: IdInt 1
2020-04-21 00:15:14.23808036 [ThreadId 16] - srcSpan2Loc: mapped file is /tmp/haskell-lsp139988/Lib.hs-00001--4512905862535020785.hs
2020-04-21 00:15:14.238170719 [ThreadId 16] - reverseMapFile: mapped file is /tmp/haskell-lsp139988/Lib.hs-00001--4512905862535020785.hs
2020-04-21 00:15:14.238219566 [ThreadId 16] - reverseMapFile: original is /home/xps/simple/src/Lib.hs
2020-04-21 00:15:14.238277921 [ThreadId 16] - reverseMapFile: Canonicalized original is /home/xps/simple/src/Lib.hs
2020-04-21 00:15:14.238312938 [ThreadId 16] - srcSpan2Loc: Original file is /home/xps/simple/src/Lib.hs
2020-04-21 00:15:14.238722353 [ThreadId 16] - ideDispatcher: top of loop
2020-04-21 00:15:14.238821865 [ThreadId 5] - <--2--{"result":[{"uri":"file:///home/xps/simple/src/Lib.hs","range":{"start":{"line":3,"character":0},"end":{"line":3,"character":3}}}],"jsonrpc":"2.0","id":1}
fendor commented 4 years ago

Thank you for your report! This is a known issue #1566 and similar exist. It wont be fixed in HIE due to architectural problems and because hls aims to solve these problems.