Skip to content
This repository was archived by the owner on Oct 7, 2020. It is now read-only.

HsImport importlist #1170

Merged
merged 11 commits into from
May 4, 2019
Merged

HsImport importlist #1170

merged 11 commits into from
May 4, 2019

Conversation

fendor
Copy link
Collaborator

@fendor fendor commented Apr 10, 2019

Closes #1086

Offers code action to add a function to import list.
E.g.

foo = hPutStrLn stderr "Hello"

With 2 code actions this can be turned into:

import System.IO (hPutStrLn, stderr)
foo = hPutStrLn stderr "Hello"

Requires:

  • Tests
  • Code cleanup
  • Documenation

@fendor fendor force-pushed the hsimport-importlist branch 2 times, most recently from e78865f to c035e47 Compare April 11, 2019 10:46
@expipiplus1
Copy link
Contributor

@fendor Now that #1167 has been merged I'd love to test this PR out if you could rebase/merge

@fendor
Copy link
Collaborator Author

fendor commented Apr 18, 2019

Due to unexpected changes in #1167, this patch does not work when rebased. For some reason it duplicates the import line. You can try it now, but i have to take a long look at it again. Will do that tomorrow, as I think this feature is great.

@fendor fendor closed this Apr 19, 2019
@fendor fendor force-pushed the hsimport-importlist branch from c035e47 to 7ef6e4b Compare April 19, 2019 16:34
@fendor fendor reopened this Apr 19, 2019
@fendor fendor force-pushed the hsimport-importlist branch 4 times, most recently from 2265c33 to 6ad3a2d Compare April 19, 2019 19:37
@fendor fendor requested a review from lukel97 April 19, 2019 19:46
@fendor
Copy link
Collaborator Author

fendor commented Apr 19, 2019

Now it works, but with a quirk: the Brittany formatter adds a newline when repeatedly used to import a single function.
Cause is that the diff function of the temporary output file where hsimport has been used on and the original file does not count the last \n as part of the difference. Brittany does add a newline though. Thus, two newlines are added, since the original newline is still present.
I dont really know how to resolve that at the moment.

@fendor fendor force-pushed the hsimport-importlist branch 3 times, most recently from 2120fd0 to fe8ed0c Compare April 20, 2019 13:51
Copy link
Collaborator

@lukel97 lukel97 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This looks great!

liftIO $ runBrittany tabSize confFile text
where tabSize = opts ^. J.tabSize

-- | Extend to the line below to replace newline character, as above.
-- | Extend to the line below and above to replace newline character.
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Does this extend the range to the line above? It looks like it does

xxxSooo
ooExxxx
xxx
=>

Soooooo
oooooo
Exxx

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Also this looks quite handy. Would it be worthwhile look at moving these helper functions into haskell-lsp-types? cc @alanz

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It could be handy to do that, but as a follow-up, this PR has had a very long history already, its unfair to ask for that too.

Copy link
Collaborator

@lukel97 lukel97 Apr 21, 2019

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I agree, this is out of scope for this PR. I think it would make more sense as part of a larger refactoring

= Exact -- ^ If you want to match exactly the search string.
| ExactName -- ^ If you want to match exactly a function name.
-- Same as @Exact@ if the term is just a function name.
| Relax (T.Text -> T.Text) -- ^ Relax the search term to match even more.
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is cool

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It might be sensible to move this to the Hoogle plugin. But right now, nobody else uses it, so it stays in HsImport.

-- A formatting type can be given to either format the whole document or only a Range.
--
-- Text to format, may or may not, originate from the associated Uri.
-- Should, but might not, honour the provided formatting options (e.g. Floskell does not).
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Bikeshedding: Should we use US or British English? ;)

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't think it really matters anymore, tbh. But my bias is toward what I know, which is British style.

@fendor fendor force-pushed the hsimport-importlist branch 5 times, most recently from c51e16e to 55b2315 Compare April 21, 2019 20:00
@fendor fendor changed the title WIP: Hsimport importlist HsImport importlist Apr 21, 2019
@fendor fendor force-pushed the hsimport-importlist branch 7 times, most recently from 3ebf677 to e9e695b Compare April 22, 2019 15:18
@fendor fendor force-pushed the hsimport-importlist branch from 381acb7 to 85ac6e4 Compare April 25, 2019 16:57
@fendor
Copy link
Collaborator Author

fendor commented Apr 28, 2019

The feature is implemented and was manually tested.
Tests should be added to actually test the behaviour in case of multiple imports and help in case of regression.
However, since I have issues with running the tests, I cant implement them right now.

@fendor
Copy link
Collaborator Author

fendor commented Apr 30, 2019

CI fails are imo unrelated to this PR.

@lukel97
Copy link
Collaborator

lukel97 commented Apr 30, 2019

Got the tests working on my machine, took a bit of fiddling, fair play for getting this far without being able to run them! This PR has been waiting for a while, @alanz is this good to merge once CI passes?

@expipiplus1
Copy link
Contributor

Now it works, but with a quirk: the Brittany formatter adds a newline when repeatedly used to import a single function.
Cause is that the diff function of the temporary output file where hsimport has been used on and the original file does not count the last \n as part of the difference. Brittany does add a newline though. Thus, two newlines are added, since the original newline is still present.
I dont really know how to resolve that at the moment.

Did this get fixed, @fendor?

@fendor
Copy link
Collaborator Author

fendor commented May 1, 2019

@expipiplus1, yes that has been fixed!

@bubba, that is great, thank you very much!

@fendor fendor force-pushed the hsimport-importlist branch from 134b1c5 to 049609d Compare May 1, 2019 18:45
@alanz alanz merged commit 69878c9 into haskell:master May 4, 2019
@alanz alanz added this to the 2019-05 milestone Jun 1, 2019
@infinisil
Copy link
Contributor

This doesn't seem to work for me, I'm using 0.10.0.0, and the only code actions I have available are the usual ones like duplicate definition & co. Is there anything needed to get this to work?

@infinisil
Copy link
Contributor

Hold on I'll debug some more, it seems to work in one project but not the other.

@fendor
Copy link
Collaborator Author

fendor commented Jun 2, 2019

It mainly works for values, not types. E.g. try to use hPutStrLn and stderr.

@infinisil
Copy link
Contributor

Yeah I'm using the very example from this PR to test. I'll be back once I have a minimal reproducible example

@infinisil
Copy link
Contributor

So it happens even with the simplest new project: https://github.com/Infinisil/hsimport-repro

I just run nix-shell in that project to get GHC and cabal, then open Main.hs in emacs and that gets me this. If you can't reproduce it (with vs-code or whatever you use), I could also make the whole emacs config including the HIE installation reproducible (as far as possible at least).

This is with a nixpkgs whose default GHC is 8.6.5, but I also tested with 8.6.4 and 8.4.4, and it's all the same.

Here's the logs:

2019-06-03 00:16:08.258354772 [ThreadId 4] - run entered for hie-wrapper(hie-wrapper) Version 0.10.0.0 x86_64 ghc-8.6.5
2019-06-03 00:16:08.258516624 [ThreadId 4] - Current directory:/home/infinisil/Test/hsimport/new
2019-06-03 00:16:08.261539457 [ThreadId 4] - Cradle directory:/home/infinisil/Test/hsimport/new
2019-06-03 00:16:08.261637532 [ThreadId 4] - Using plain GHC version
2019-06-03 00:16:08.292737718 [ThreadId 4] - Project GHC version:8.6.5
2019-06-03 00:16:08.292825686 [ThreadId 4] - hie exe candidates :["hie-8.6.5","hie-8.6","hie"]
2019-06-03 00:16:08.293565473 [ThreadId 4] - found hie exe at:/nix/store/r17ajw8w65jmw1r2fivi6p8xlzd5b12k-haskell-ide-engine-combined/libexec/bin/hie-8.6.5
2019-06-03 00:16:08.293606134 [ThreadId 4] - args:["--lsp","--vomit","-d","-l","/tmp/hie.log"]
2019-06-03 00:16:08.2936341 [ThreadId 4] - launching ....



2019-06-03 00:16:08.617752169 [ThreadId 4] - Using plain GHC version
2019-06-03 00:16:08.650853796 [ThreadId 4] - Run entered for HIE(hie-8.6.5) Version 0.10.0.0 x86_64 ghc-8.6.5
2019-06-03 00:16:08.651018491 [ThreadId 4] - Current directory:/home/infinisil/Test/hsimport/new
2019-06-03 00:16:08.651061746 [ThreadId 4] - Enabling --vomit for ghc-mod. Output will be on stderr
2019-06-03 00:16:08.651155894 [ThreadId 4] -




haskell-lsp:Starting up server ...
2019-06-03 00:16:08.651401307 [ThreadId 4] - ---> {"jsonrpc":"2.0","method":"initialize","params":{"processId":5790,"rootPath":"/home/infinisil/Test/hsimport/new/","rootUri":"file:///home/infinisil/Test/hsimport/new/","capabilities":{"workspace":{"workspaceEdit":{"documentChanges":true,"resourceOperations":["create","rename","delete"]},"applyEdit":true,"symbol":{"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":false},"didChangeWatchedFiles":{"dynamicRegistration":true},"workspaceFolders":true,"configuration":true},"textDocument":{"declaration":{"linkSupport":true},"definition":{"linkSupport":true},"implementation":{"linkSupport":true},"typeDefinition":{"linkSupport":true},"synchronization":{"willSave":true,"didSave":true,"willSaveWaitUntil":true},"documentSymbol":{"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},"formatting":{"dynamicRegistration":true},"codeAction":{"dynamicRegistration":true,"codeActionLiteralSupport":{"codeActionKind":{"valueSet":["","quickfix","refactor","refactor.extract","refactor.inline","refactor.rewrite","source","source.organizeImports"]}}},"completion":{"completionItem":{"snippetSupport":true},"contextSupport":true},"signatureHelp":{"signatureInformation":{"parameterInformation":{"labelOffsetSupport":true}}},"documentLink":{"dynamicRegistration":true},"hover":{"contentFormat":["plaintext","markdown"]},"foldingRange":{"dynamicRegistration":true,"rangeLimit":null,"lineFoldingOnly":null}}},"initializationOptions":"lsp-haskell--make-init-options"},"id":1}

2019-06-03 00:16:08.652053995 [ThreadId 4] - haskell-lsp:initializeRequestHandler: setting current dir to project root:/home/infinisil/Test/hsimport/new/
2019-06-03 00:16:08.670923198 [ThreadId 10] - ****** reactor: top of loop
2019-06-03 00:16:08.671322377 [ThreadId 6] - <--2--{"result":{"capabilities":{"typeDefinitionProvider":true,"textDocumentSync":{"openClose":true,"change":2,"willSave":false,"willSaveWaitUntil":false,"save":{"includeText":false}},"workspace":{},"documentRangeFormattingProvider":true,"documentHighlightProvider":true,"executeCommandProvider":{"commands":["5953:applyrefact:applyOne","5953:applyrefact:applyAll","5953:applyrefact:lint","5953:base:version","5953:base:plugins","5953:base:commands","5953:base:commandDetail","5953:build:prepare","5953:build:isConfigured","5953:build:configure","5953:build:listTargets","5953:build:listFlags","5953:build:buildDirectory","5953:build:buildTarget","5953:ghcmod:check","5953:ghcmod:type","5953:ghcmod:casesplit","5953:hare:demote","5953:hare:dupdef","5953:hare:iftocase","5953:hare:liftonelevel","5953:hare:lifttotoplevel","5953:hare:rename","5953:hare:deletedef","5953:hare:genapplicative","5953:hare:casesplit","5953:hoogle:info","5953:hoogle:lookup","5953:hsimport:import","5953:liquid:sayHello","5953:liquid:sayHelloTo","5953:package:add","5953:pragmas:addPragma"]},"renameProvider":true,"definitionProvider":true,"hoverProvider":true,"codeActionProvider":true,"completionProvider":{"triggerCharacters":["."],"resolveProvider":true},"documentSymbolProvider":true,"documentFormattingProvider":true,"referencesProvider":true}},"jsonrpc":"2.0","id":1}
2019-06-03 00:16:08.67141173 [ThreadId 13] - ideDispatcher: top of loop
2019-06-03 00:16:08.671459778 [ThreadId 4] - ---> {"jsonrpc":"2.0","method":"initialized","params":{}}

2019-06-03 00:16:08.671624078 [ThreadId 12] - ghcDispatcher: top of loop
2019-06-03 00:16:08.671665368 [ThreadId 4] - ---> {"jsonrpc":"2.0","method":"textDocument/didOpen","params":{"textDocument":{"uri":"file:///home/infinisil/Test/hsimport/new/Main.hs","languageId":"haskell","version":0,"text":"module Main where\n\n\nmain :: IO ()\nmain = hPutStrLn stderr \"Hello, Haskell!\"\n"}}}

2019-06-03 00:16:08.671808864 [ThreadId 10] - ****** reactor: got message number:0
2019-06-03 00:16:08.671856406 [ThreadId 4] - ---> {"jsonrpc":"2.0","method":"workspace/didChangeConfiguration","params":{"settings":{"languageServerHaskell":{}}}}

2019-06-03 00:16:08.671923193 [ThreadId 10] - ****** reactor: processing Initialized Notification
2019-06-03 00:16:08.672027061 [ThreadId 10] - Using plain GHC version
2019-06-03 00:16:08.672395104 [ThreadId 6] - <--2--{"jsonrpc":"2.0","params":{"type":4,"message":"Using hie version: Version 0.10.0.0 x86_64 ghc-8.6.5"},"method":"window/logMessage"}
2019-06-03 00:16:08.704974521 [ThreadId 10] - ****** reactor: top of loop
2019-06-03 00:16:08.705057765 [ThreadId 10] - ****** reactor: got message number:1
2019-06-03 00:16:08.705091245 [ThreadId 10] - ****** reactor: processing NotDidOpenTextDocument
2019-06-03 00:16:08.70515521 [ThreadId 10] - requestDiagnostics: no diagFunc for:DiagnosticOnOpen
2019-06-03 00:16:08.705188427 [ThreadId 10] - ****** reactor: top of loop
2019-06-03 00:16:08.705226762 [ThreadId 10] - ****** reactor: got message number:2
2019-06-03 00:16:08.705254749 [ThreadId 10] - reactor:didChangeConfiguration notification:NotificationMessage {_jsonrpc = "2.0", _method = WorkspaceDidChangeConfiguration, _params = DidChangeConfigurationParams {_settings = Object (fromList [("languageServerHaskell",Object (fromList []))])}}
2019-06-03 00:16:08.705301369 [ThreadId 10] - reactor:didChangeConfiguration diagsOn:True
2019-06-03 00:16:08.705337502 [ThreadId 10] - ****** reactor: top of loop
2019-06-03 00:16:08.705391398 [ThreadId 12] - ghcDispatcher:got request 0 with id: Nothing
2019-06-03 00:16:08.705548745 [ThreadId 12] - ghcDispatcher: top of loop
2019-06-03 00:16:08.705584164 [ThreadId 12] - ghcDispatcher:got request 1 with id: Nothing
2019-06-03 00:16:08.707125634 [ThreadId 6] - <--2--{"jsonrpc":"2.0","params":{"type":2,"message":"No hoogle db found. Check the README for instructions to generate one"},"method":"window/showMessage"}
2019-06-03 00:16:08.708598079 [ThreadId 12] - file mapping state is: fromList [("/home/infinisil/Test/hsimport/new/Main.hs",FileMapping {fmPath = "/run/user/1000/ghc-mod5954/Main5953-0.hs", fmTemp = True})]
2019-06-03 00:16:08.708659089 [ThreadId 12] - ghcDispatcher: top of loop
2019-06-03 00:16:08.70868966 [ThreadId 12] - ghcDispatcher:got request 1 with id: Nothing
2019-06-03 00:16:08.708758486 [ThreadId 12] - ghcDispatcher:Processing request as version matches
2019-06-03 00:16:08.764117166 [ThreadId 12] - ghcDispatcher: top of loop
2019-06-03 00:16:08.76421946 [ThreadId 12] - ghcDispatcher:got request 1 with id: Nothing
2019-06-03 00:16:08.764257087 [ThreadId 12] - ghcDispatcher:Processing request as version matches
2019-06-03 00:16:08.764573625 [ThreadId 12] - setTypecheckedModule: file mapping state is: fromList [("/home/infinisil/Test/hsimport/new/Main.hs",FileMapping {fmPath = "/run/user/1000/ghc-mod5954/Main5953-0.hs", fmTemp = True})]
2019-06-03 00:16:08.764624353 [ThreadId 12] - setTypecheckedModule: before ghc-mod
2019-06-03 00:16:08.834408602 [ThreadId 6] - <--2--{"jsonrpc":"2.0","params":{"uri":"file:///home/infinisil/Test/hsimport/new/Main.hs","diagnostics":[]},"method":"textDocument/publishDiagnostics"}
2019-06-03 00:16:08.837128706 [ThreadId 4] - ---> {"jsonrpc":"2.0","method":"textDocument/codeAction","params":{"textDocument":{"uri":"file:///home/infinisil/Test/hsimport/new/Main.hs"},"range":{"start":{"line":0,"character":0},"end":{"line":0,"character":17}},"context":{"diagnostics":[]}},"id":2}

2019-06-03 00:16:08.837302869 [ThreadId 10] - ****** reactor: got message number:3
2019-06-03 00:16:08.837357545 [ThreadId 10] - reactor:got CodeActionRequest:RequestMessage {_jsonrpc = "2.0", _id = IdInt 2, _method = TextDocumentCodeAction, _params = CodeActionParams {_textDocument = TextDocumentIdentifier {_uri = Uri {getUri = "file:///home/infinisil/Test/hsimport/new/Main.hs"}}, _range = Range {_start = Position {_line = 0, _character = 0}, _end = Position {_line = 0, _character = 17}}, _context = CodeActionContext {_diagnostics = List [], only = Nothing}}}
2019-06-03 00:16:08.837419171 [ThreadId 10] - ****** reactor: top of loop
2019-06-03 00:16:08.837453627 [ThreadId 13] - ideDispatcher: got request 3 with id: IdInt 2
2019-06-03 00:16:08.837489723 [ThreadId 13] - ideDispatcher: top of loop
2019-06-03 00:16:08.837515881 [ThreadId 13] - ideDispatcher: got request 3 with id: IdInt 2
2019-06-03 00:16:08.837544359 [ThreadId 13] - ideDispatcher: top of loop
2019-06-03 00:16:08.837567816 [ThreadId 13] - ideDispatcher: got request 3 with id: IdInt 2
2019-06-03 00:16:08.837600718 [ThreadId 13] - ideDispatcher: top of loop
2019-06-03 00:16:08.83762609 [ThreadId 13] - ideDispatcher: got request 3 with id: IdInt 2
2019-06-03 00:16:08.837731212 [ThreadId 13] - ideDispatcher: top of loop
2019-06-03 00:16:08.837770626 [ThreadId 13] - ideDispatcher: got request 3 with id: IdInt 2
2019-06-03 00:16:08.837799768 [ThreadId 13] - ideDispatcher: top of loop
2019-06-03 00:16:08.837824134 [ThreadId 13] - ideDispatcher: got request 3 with id: IdInt 2
2019-06-03 00:16:08.837855855 [ThreadId 13] - ideDispatcher: top of loop
2019-06-03 00:16:08.837881183 [ThreadId 13] - ideDispatcher: got request 3 with id: IdInt 2
2019-06-03 00:16:08.837956724 [ThreadId 13] - ideDispatcher: top of loop
2019-06-03 00:16:08.838206693 [ThreadId 4] - ---> {"jsonrpc":"2.0","method":"textDocument/hover","params":{"textDocument":{"uri":"file:///home/infinisil/Test/hsimport/new/Main.hs"},"position":{"line":0,"character":0}},"id":3}

2019-06-03 00:16:08.838338446 [ThreadId 4] - ---> {"jsonrpc":"2.0","method":"textDocument/hover","params":{"textDocument":{"uri":"file:///home/infinisil/Test/hsimport/new/Main.hs"},"position":{"line":0,"character":7}},"id":4}

2019-06-03 00:16:08.838531007 [ThreadId 4] - ---> {"jsonrpc":"2.0","method":"textDocument/hover","params":{"textDocument":{"uri":"file:///home/infinisil/Test/hsimport/new/Main.hs"},"position":{"line":0,"character":12}},"id":5}

2019-06-03 00:16:08.838656688 [ThreadId 6] - <--2--{"result":[],"jsonrpc":"2.0","id":2}
2019-06-03 00:16:08.838719313 [ThreadId 10] - ****** reactor: got message number:4
2019-06-03 00:16:08.838748979 [ThreadId 10] - reactor:got HoverRequest:RequestMessage {_jsonrpc = "2.0", _id = IdInt 3, _method = TextDocumentHover, _params = TextDocumentPositionParams {_textDocument = TextDocumentIdentifier {_uri = Uri {getUri = "file:///home/infinisil/Test/hsimport/new/Main.hs"}}, _position = Position {_line = 0, _character = 0}}}
2019-06-03 00:16:08.838786325 [ThreadId 10] - reactor:HoverRequest done
2019-06-03 00:16:08.838819297 [ThreadId 10] - ****** reactor: top of loop
2019-06-03 00:16:08.838844943 [ThreadId 10] - ****** reactor: got message number:5
2019-06-03 00:16:08.838868158 [ThreadId 10] - reactor:got HoverRequest:RequestMessage {_jsonrpc = "2.0", _id = IdInt 4, _method = TextDocumentHover, _params = TextDocumentPositionParams {_textDocument = TextDocumentIdentifier {_uri = Uri {getUri = "file:///home/infinisil/Test/hsimport/new/Main.hs"}}, _position = Position {_line = 0, _character = 7}}}
2019-06-03 00:16:08.838922106 [ThreadId 10] - reactor:HoverRequest done
2019-06-03 00:16:08.838958174 [ThreadId 10] - ****** reactor: top of loop
2019-06-03 00:16:08.838992597 [ThreadId 10] - ****** reactor: got message number:6
2019-06-03 00:16:08.839016294 [ThreadId 10] - reactor:got HoverRequest:RequestMessage {_jsonrpc = "2.0", _id = IdInt 5, _method = TextDocumentHover, _params = TextDocumentPositionParams {_textDocument = TextDocumentIdentifier {_uri = Uri {getUri = "file:///home/infinisil/Test/hsimport/new/Main.hs"}}, _position = Position {_line = 0, _character = 12}}}
2019-06-03 00:16:08.839070863 [ThreadId 10] - reactor:HoverRequest done
2019-06-03 00:16:08.839096931 [ThreadId 10] - ****** reactor: top of loop
2019-06-03 00:16:08.839153944 [ThreadId 13] - ideDispatcher: got request 4 with id: IdInt 3
2019-06-03 00:16:08.839425653 [ThreadId 13] - ideDispatcher: top of loop
2019-06-03 00:16:08.839462316 [ThreadId 13] - ideDispatcher: got request 5 with id: IdInt 4
2019-06-03 00:16:08.839708123 [ThreadId 13] - ideDispatcher: top of loop
2019-06-03 00:16:08.839740976 [ThreadId 13] - ideDispatcher: got request 6 with id: IdInt 5
2019-06-03 00:16:08.839829562 [ThreadId 6] - <--2--{"result":null,"jsonrpc":"2.0","id":3}
2019-06-03 00:16:08.840151784 [ThreadId 6] - <--2--{"result":null,"jsonrpc":"2.0","id":4}
2019-06-03 00:16:08.840272331 [ThreadId 13] - ideDispatcher: top of loop
2019-06-03 00:16:08.840328907 [ThreadId 6] - <--2--{"result":null,"jsonrpc":"2.0","id":5}
2019-06-03 00:16:09.415157079 [ThreadId 12] - srcSpan2Loc: mapped file is /run/user/1000/ghc-mod5954/Main5953-0.hs
2019-06-03 00:16:09.41527503 [ThreadId 12] - reverseMapFile: mapped file is /run/user/1000/ghc-mod5954/Main5953-0.hs
2019-06-03 00:16:09.415311678 [ThreadId 12] - reverseMapFile: original is Main.hs
2019-06-03 00:16:09.415389689 [ThreadId 12] - reverseMapFile: Canonicalized original is Main.hs
2019-06-03 00:16:09.415419692 [ThreadId 12] - srcSpan2Loc: Original file is /home/infinisil/Test/hsimport/new/Main.hs
2019-06-03 00:16:09.415465598 [ThreadId 12] - srcSpan2Loc: mapped file is /run/user/1000/ghc-mod5954/Main5953-0.hs
2019-06-03 00:16:09.415510009 [ThreadId 12] - reverseMapFile: mapped file is /run/user/1000/ghc-mod5954/Main5953-0.hs
2019-06-03 00:16:09.415539152 [ThreadId 12] - reverseMapFile: original is Main.hs
2019-06-03 00:16:09.415595452 [ThreadId 12] - reverseMapFile: Canonicalized original is Main.hs
2019-06-03 00:16:09.415621557 [ThreadId 12] - srcSpan2Loc: Original file is /home/infinisil/Test/hsimport/new/Main.hs
2019-06-03 00:16:09.418355253 [ThreadId 12] - setTypecheckedModule: after ghc-mod
2019-06-03 00:16:09.418461768 [ThreadId 12] - setTypecheckedModule: Did get parsed module for: "/home/infinisil/Test/hsimport/new/Main.hs"
2019-06-03 00:16:09.418534325 [ThreadId 12] - setTypecheckedModule: done
2019-06-03 00:16:09.418579172 [ThreadId 12] - ghcDispatcher: top of loop
2019-06-03 00:16:09.419504346 [ThreadId 6] - <--2--{"jsonrpc":"2.0","params":{"uri":"file:///home/infinisil/Test/hsimport/new/Main.hs","diagnostics":[{"severity":1,"range":{"start":{"line":4,"character":7},"end":{"line":4,"character":16}},"source":"ghcmod","message":"• Variable not in scope: hPutStrLn :: t0 -> [Char] -> IO ()\n• Perhaps you meant ‘putStrLn’ (imported from Prelude)"},{"severity":1,"range":{"start":{"line":4,"character":17},"end":{"line":4,"character":23}},"source":"ghcmod","message":"Variable not in scope: stderr"}]},"method":"textDocument/publishDiagnostics"}
2019-06-03 00:16:09.421838487 [ThreadId 4] - ---> {"jsonrpc":"2.0","method":"textDocument/codeAction","params":{"textDocument":{"uri":"file:///home/infinisil/Test/hsimport/new/Main.hs"},"range":{"start":{"line":0,"character":0},"end":{"line":0,"character":17}},"context":{"diagnostics":[]}},"id":6}

2019-06-03 00:16:09.422014368 [ThreadId 10] - ****** reactor: got message number:7
2019-06-03 00:16:09.422061092 [ThreadId 10] - reactor:got CodeActionRequest:RequestMessage {_jsonrpc = "2.0", _id = IdInt 6, _method = TextDocumentCodeAction, _params = CodeActionParams {_textDocument = TextDocumentIdentifier {_uri = Uri {getUri = "file:///home/infinisil/Test/hsimport/new/Main.hs"}}, _range = Range {_start = Position {_line = 0, _character = 0}, _end = Position {_line = 0, _character = 17}}, _context = CodeActionContext {_diagnostics = List [], only = Nothing}}}
2019-06-03 00:16:09.422118167 [ThreadId 10] - ****** reactor: top of loop
2019-06-03 00:16:09.422151631 [ThreadId 13] - ideDispatcher: got request 7 with id: IdInt 6
2019-06-03 00:16:09.422184844 [ThreadId 13] - ideDispatcher: top of loop
2019-06-03 00:16:09.422770988 [ThreadId 13] - ideDispatcher: got request 7 with id: IdInt 6
2019-06-03 00:16:09.422818368 [ThreadId 13] - ideDispatcher: top of loop
2019-06-03 00:16:09.42285392 [ThreadId 13] - ideDispatcher: got request 7 with id: IdInt 6
2019-06-03 00:16:09.422881002 [ThreadId 13] - ideDispatcher: top of loop
2019-06-03 00:16:09.422931669 [ThreadId 13] - ideDispatcher: got request 7 with id: IdInt 6
2019-06-03 00:16:09.423152589 [ThreadId 13] - ideDispatcher: top of loop
2019-06-03 00:16:09.423190209 [ThreadId 13] - ideDispatcher: got request 7 with id: IdInt 6
2019-06-03 00:16:09.423222267 [ThreadId 13] - ideDispatcher: top of loop
2019-06-03 00:16:09.423246912 [ThreadId 13] - ideDispatcher: got request 7 with id: IdInt 6
2019-06-03 00:16:09.423272983 [ThreadId 13] - ideDispatcher: top of loop
2019-06-03 00:16:09.423296435 [ThreadId 13] - ideDispatcher: got request 7 with id: IdInt 6
2019-06-03 00:16:09.423325135 [ThreadId 13] - ideDispatcher: top of loop
2019-06-03 00:16:09.423466665 [ThreadId 4] - ---> {"jsonrpc":"2.0","method":"textDocument/hover","params":{"textDocument":{"uri":"file:///home/infinisil/Test/hsimport/new/Main.hs"},"position":{"line":0,"character":0}},"id":7}

2019-06-03 00:16:09.42372499 [ThreadId 4] - ---> {"jsonrpc":"2.0","method":"textDocument/hover","params":{"textDocument":{"uri":"file:///home/infinisil/Test/hsimport/new/Main.hs"},"position":{"line":0,"character":7}},"id":8}

2019-06-03 00:16:09.423830635 [ThreadId 4] - ---> {"jsonrpc":"2.0","method":"textDocument/hover","params":{"textDocument":{"uri":"file:///home/infinisil/Test/hsimport/new/Main.hs"},"position":{"line":0,"character":12}},"id":9}

2019-06-03 00:16:09.423966582 [ThreadId 6] - <--2--{"result":[],"jsonrpc":"2.0","id":6}
2019-06-03 00:16:09.42403668 [ThreadId 10] - ****** reactor: got message number:8
2019-06-03 00:16:09.424064655 [ThreadId 10] - reactor:got HoverRequest:RequestMessage {_jsonrpc = "2.0", _id = IdInt 7, _method = TextDocumentHover, _params = TextDocumentPositionParams {_textDocument = TextDocumentIdentifier {_uri = Uri {getUri = "file:///home/infinisil/Test/hsimport/new/Main.hs"}}, _position = Position {_line = 0, _character = 0}}}
2019-06-03 00:16:09.424107704 [ThreadId 10] - reactor:HoverRequest done
2019-06-03 00:16:09.424134962 [ThreadId 10] - ****** reactor: top of loop
2019-06-03 00:16:09.42415883 [ThreadId 10] - ****** reactor: got message number:9
2019-06-03 00:16:09.424181856 [ThreadId 10] - reactor:got HoverRequest:RequestMessage {_jsonrpc = "2.0", _id = IdInt 8, _method = TextDocumentHover, _params = TextDocumentPositionParams {_textDocument = TextDocumentIdentifier {_uri = Uri {getUri = "file:///home/infinisil/Test/hsimport/new/Main.hs"}}, _position = Position {_line = 0, _character = 7}}}
2019-06-03 00:16:09.424227961 [ThreadId 10] - reactor:HoverRequest done
2019-06-03 00:16:09.424254577 [ThreadId 10] - ****** reactor: top of loop
2019-06-03 00:16:09.424287087 [ThreadId 10] - ****** reactor: got message number:10
2019-06-03 00:16:09.424422413 [ThreadId 10] - reactor:got HoverRequest:RequestMessage {_jsonrpc = "2.0", _id = IdInt 9, _method = TextDocumentHover, _params = TextDocumentPositionParams {_textDocument = TextDocumentIdentifier {_uri = Uri {getUri = "file:///home/infinisil/Test/hsimport/new/Main.hs"}}, _position = Position {_line = 0, _character = 12}}}
2019-06-03 00:16:09.424461827 [ThreadId 10] - reactor:HoverRequest done
2019-06-03 00:16:09.424488283 [ThreadId 10] - ****** reactor: top of loop
2019-06-03 00:16:09.424539078 [ThreadId 13] - ideDispatcher: got request 8 with id: IdInt 7
2019-06-03 00:16:09.424756942 [ThreadId 13] - ideDispatcher: top of loop
2019-06-03 00:16:09.424793621 [ThreadId 13] - ideDispatcher: got request 9 with id: IdInt 8
2019-06-03 00:16:09.425006599 [ThreadId 6] - <--2--{"result":null,"jsonrpc":"2.0","id":7}
2019-06-03 00:16:09.425161033 [ThreadId 13] - ideDispatcher: top of loop
2019-06-03 00:16:09.425195637 [ThreadId 13] - ideDispatcher: got request 10 with id: IdInt 9
2019-06-03 00:16:09.425415968 [ThreadId 6] - <--2--{"result":null,"jsonrpc":"2.0","id":8}
2019-06-03 00:16:09.425640784 [ThreadId 13] - ideDispatcher: top of loop
2019-06-03 00:16:09.425688242 [ThreadId 6] - <--2--{"result":null,"jsonrpc":"2.0","id":9}
2019-06-03 00:16:16.967694669 [ThreadId 4] - ---> {"jsonrpc":"2.0","method":"textDocument/hover","params":{"textDocument":{"uri":"file:///home/infinisil/Test/hsimport/new/Main.hs"},"position":{"line":0,"character":0}},"id":10}

2019-06-03 00:16:16.968173747 [ThreadId 10] - ****** reactor: got message number:11
2019-06-03 00:16:16.968371989 [ThreadId 10] - reactor:got HoverRequest:RequestMessage {_jsonrpc = "2.0", _id = IdInt 10, _method = TextDocumentHover, _params = TextDocumentPositionParams {_textDocument = TextDocumentIdentifier {_uri = Uri {getUri = "file:///home/infinisil/Test/hsimport/new/Main.hs"}}, _position = Position {_line = 0, _character = 0}}}
2019-06-03 00:16:16.968520617 [ThreadId 10] - reactor:HoverRequest done
2019-06-03 00:16:16.968619165 [ThreadId 10] - ****** reactor: top of loop
2019-06-03 00:16:16.968731651 [ThreadId 13] - ideDispatcher: got request 11 with id: IdInt 10
2019-06-03 00:16:16.969838883 [ThreadId 13] - ideDispatcher: top of loop
2019-06-03 00:16:16.970051311 [ThreadId 6] - <--2--{"result":null,"jsonrpc":"2.0","id":10}
2019-06-03 00:16:17.172208898 [ThreadId 4] - ---> {"jsonrpc":"2.0","method":"textDocument/documentHighlight","params":{"textDocument":{"uri":"file:///home/infinisil/Test/hsimport/new/Main.hs"},"position":{"line":0,"character":0}},"id":11}

2019-06-03 00:16:17.172627519 [ThreadId 10] - ****** reactor: got message number:12
2019-06-03 00:16:17.172874871 [ThreadId 10] - reactor:got DocumentHighlightsRequest:RequestMessage {_jsonrpc = "2.0", _id = IdInt 11, _method = TextDocumentDocumentHighlight, _params = TextDocumentPositionParams {_textDocument = TextDocumentIdentifier {_uri = Uri {getUri = "file:///home/infinisil/Test/hsimport/new/Main.hs"}}, _position = Position {_line = 0, _character = 0}}}
2019-06-03 00:16:17.173129338 [ThreadId 10] - ****** reactor: top of loop
2019-06-03 00:16:17.173339721 [ThreadId 13] - ideDispatcher: got request 12 with id: IdInt 11
2019-06-03 00:16:17.174219927 [ThreadId 13] - ideDispatcher: top of loop
2019-06-03 00:16:18.303123014 [ThreadId 4] - ---> {"jsonrpc":"2.0","method":"textDocument/hover","params":{"textDocument":{"uri":"file:///home/infinisil/Test/hsimport/new/Main.hs"},"position":{"line":4,"character":0}},"id":12}

2019-06-03 00:16:18.303568958 [ThreadId 10] - ****** reactor: got message number:13
2019-06-03 00:16:18.303771413 [ThreadId 10] - reactor:got HoverRequest:RequestMessage {_jsonrpc = "2.0", _id = IdInt 12, _method = TextDocumentHover, _params = TextDocumentPositionParams {_textDocument = TextDocumentIdentifier {_uri = Uri {getUri = "file:///home/infinisil/Test/hsimport/new/Main.hs"}}, _position = Position {_line = 4, _character = 0}}}
2019-06-03 00:16:18.303937942 [ThreadId 10] - reactor:HoverRequest done
2019-06-03 00:16:18.303973329 [ThreadId 10] - ****** reactor: top of loop
2019-06-03 00:16:18.304016698 [ThreadId 13] - ideDispatcher: got request 13 with id: IdInt 12
2019-06-03 00:16:18.304492193 [ThreadId 13] - ideDispatcher: top of loop
2019-06-03 00:16:18.304561127 [ThreadId 6] - <--2--{"result":null,"jsonrpc":"2.0","id":12}
2019-06-03 00:16:18.506406431 [ThreadId 4] - ---> {"jsonrpc":"2.0","method":"textDocument/codeAction","params":{"textDocument":{"uri":"file:///home/infinisil/Test/hsimport/new/Main.hs"},"range":{"start":{"line":4,"character":0},"end":{"line":4,"character":41}},"context":{"diagnostics":[{"message":"• Variable not in scope: hPutStrLn :: t0 -> [Char] -> IO ()\n• Perhaps you meant ‘putStrLn’ (imported from Prelude)","source":"ghcmod","range":{"end":{"character":16,"line":4},"start":{"character":7,"line":4}},"severity":1},{"message":"Variable not in scope: stderr","source":"ghcmod","range":{"end":{"character":23,"line":4},"start":{"character":17,"line":4}},"severity":1}]}},"id":13}

2019-06-03 00:16:18.506675525 [ThreadId 10] - ****** reactor: got message number:14
2019-06-03 00:16:18.506726606 [ThreadId 10] - reactor:got CodeActionRequest:RequestMessage {_jsonrpc = "2.0", _id = IdInt 13, _method = TextDocumentCodeAction, _params = CodeActionParams {_textDocument = TextDocumentIdentifier {_uri = Uri {getUri = "file:///home/infinisil/Test/hsimport/new/Main.hs"}}, _range = Range {_start = Position {_line = 4, _character = 0}, _end = Position {_line = 4, _character = 41}}, _context = CodeActionContext {_diagnostics = List [Diagnostic {_range = Range {_start = Position {_line = 4, _character = 7}, _end = Position {_line = 4, _character = 16}}, _severity = Just DsError, _code = Nothing, _source = Just "ghcmod", _message = "\8226 Variable not in scope: hPutStrLn :: t0 -> [Char] -> IO ()\n\8226 Perhaps you meant \8216putStrLn\8217 (imported from Prelude)", _relatedInformation = Nothing},Diagnostic {_range = Range {_start = Position {_line = 4, _character = 17}, _end = Position {_line = 4, _character = 23}}, _severity = Just DsError, _code = Nothing, _source = Just "ghcmod", _message = "Variable not in scope: stderr", _relatedInformation = Nothing}], only = Nothing}}}
2019-06-03 00:16:18.507231685 [ThreadId 4] - ---> {"jsonrpc":"2.0","method":"textDocument/hover","params":{"textDocument":{"uri":"file:///home/infinisil/Test/hsimport/new/Main.hs"},"position":{"line":4,"character":0}},"id":14}

2019-06-03 00:16:18.507307167 [ThreadId 10] - ****** reactor: top of loop
2019-06-03 00:16:18.507480282 [ThreadId 4] - ---> {"jsonrpc":"2.0","method":"textDocument/hover","params":{"textDocument":{"uri":"file:///home/infinisil/Test/hsimport/new/Main.hs"},"position":{"line":4,"character":7}},"id":15}

2019-06-03 00:16:18.507522877 [ThreadId 13] - ideDispatcher: got request 14 with id: IdInt 13
2019-06-03 00:16:18.5075687 [ThreadId 10] - ****** reactor: got message number:15
2019-06-03 00:16:18.508012744 [ThreadId 4] - ---> {"jsonrpc":"2.0","method":"textDocument/hover","params":{"textDocument":{"uri":"file:///home/infinisil/Test/hsimport/new/Main.hs"},"position":{"line":4,"character":17}},"id":16}

2019-06-03 00:16:18.508085815 [ThreadId 13] - ideDispatcher: top of loop
2019-06-03 00:16:18.508129102 [ThreadId 10] - reactor:got HoverRequest:RequestMessage {_jsonrpc = "2.0", _id = IdInt 14, _method = TextDocumentHover, _params = TextDocumentPositionParams {_textDocument = TextDocumentIdentifier {_uri = Uri {getUri = "file:///home/infinisil/Test/hsimport/new/Main.hs"}}, _position = Position {_line = 4, _character = 0}}}
2019-06-03 00:16:18.508287364 [ThreadId 4] - ---> {"jsonrpc":"2.0","method":"textDocument/documentHighlight","params":{"textDocument":{"uri":"file:///home/infinisil/Test/hsimport/new/Main.hs"},"position":{"line":4,"character":0}},"id":17}

2019-06-03 00:16:18.508349821 [ThreadId 13] - ideDispatcher: got request 14 with id: IdInt 13
2019-06-03 00:16:18.508409238 [ThreadId 10] - reactor:HoverRequest done
2019-06-03 00:16:18.508654576 [ThreadId 13] - ideDispatcher: top of loop
2019-06-03 00:16:18.508696623 [ThreadId 10] - ****** reactor: top of loop
2019-06-03 00:16:18.508732416 [ThreadId 13] - ideDispatcher: got request 15 with id: IdInt 14
2019-06-03 00:16:18.50876901 [ThreadId 10] - ****** reactor: got message number:16
2019-06-03 00:16:18.508975106 [ThreadId 10] - reactor:got HoverRequest:RequestMessage {_jsonrpc = "2.0", _id = IdInt 15, _method = TextDocumentHover, _params = TextDocumentPositionParams {_textDocument = TextDocumentIdentifier {_uri = Uri {getUri = "file:///home/infinisil/Test/hsimport/new/Main.hs"}}, _position = Position {_line = 4, _character = 7}}}
2019-06-03 00:16:18.509039516 [ThreadId 10] - reactor:HoverRequest done
2019-06-03 00:16:18.509075073 [ThreadId 10] - ****** reactor: top of loop
2019-06-03 00:16:18.509101835 [ThreadId 10] - ****** reactor: got message number:17
2019-06-03 00:16:18.509125999 [ThreadId 10] - reactor:got HoverRequest:RequestMessage {_jsonrpc = "2.0", _id = IdInt 16, _method = TextDocumentHover, _params = TextDocumentPositionParams {_textDocument = TextDocumentIdentifier {_uri = Uri {getUri = "file:///home/infinisil/Test/hsimport/new/Main.hs"}}, _position = Position {_line = 4, _character = 17}}}
2019-06-03 00:16:18.509164534 [ThreadId 10] - reactor:HoverRequest done
2019-06-03 00:16:18.50919107 [ThreadId 10] - ****** reactor: top of loop
2019-06-03 00:16:18.509215326 [ThreadId 10] - ****** reactor: got message number:18
2019-06-03 00:16:18.509238936 [ThreadId 10] - reactor:got DocumentHighlightsRequest:RequestMessage {_jsonrpc = "2.0", _id = IdInt 17, _method = TextDocumentDocumentHighlight, _params = TextDocumentPositionParams {_textDocument = TextDocumentIdentifier {_uri = Uri {getUri = "file:///home/infinisil/Test/hsimport/new/Main.hs"}}, _position = Position {_line = 4, _character = 0}}}
2019-06-03 00:16:18.509287159 [ThreadId 10] - ****** reactor: top of loop
2019-06-03 00:16:18.509587554 [ThreadId 13] - ideDispatcher: top of loop
2019-06-03 00:16:18.509628055 [ThreadId 13] - ideDispatcher: got request 14 with id: IdInt 13
2019-06-03 00:16:18.509658722 [ThreadId 13] - ideDispatcher: top of loop
2019-06-03 00:16:18.509683694 [ThreadId 13] - ideDispatcher: got request 16 with id: IdInt 15
2019-06-03 00:16:18.509900867 [ThreadId 6] - <--2--{"result":null,"jsonrpc":"2.0","id":14}
2019-06-03 00:16:18.510019879 [ThreadId 13] - ideDispatcher: top of loop
2019-06-03 00:16:18.510069864 [ThreadId 13] - ideDispatcher: got request 17 with id: IdInt 16
2019-06-03 00:16:18.510388271 [ThreadId 6] - <--2--{"result":null,"jsonrpc":"2.0","id":15}
2019-06-03 00:16:18.510511589 [ThreadId 13] - ideDispatcher: top of loop
2019-06-03 00:16:18.510547948 [ThreadId 13] - ideDispatcher: got request 18 with id: IdInt 17
2019-06-03 00:16:18.510632279 [ThreadId 13] - ideDispatcher: top of loop
2019-06-03 00:16:18.510672323 [ThreadId 13] - ideDispatcher: got request 14 with id: IdInt 13
2019-06-03 00:16:18.510749112 [ThreadId 13] - ideDispatcher: top of loop
2019-06-03 00:16:18.510778416 [ThreadId 13] - ideDispatcher: got request 14 with id: IdInt 13
2019-06-03 00:16:18.510972319 [ThreadId 13] - ideDispatcher: top of loop
2019-06-03 00:16:18.511015362 [ThreadId 13] - ideDispatcher: got request 14 with id: IdInt 13
2019-06-03 00:16:18.511051387 [ThreadId 13] - ideDispatcher: top of loop
2019-06-03 00:16:18.511077422 [ThreadId 13] - ideDispatcher: got request 14 with id: IdInt 13
2019-06-03 00:16:18.511154148 [ThreadId 13] - ideDispatcher: top of loop
2019-06-03 00:16:18.511202661 [ThreadId 6] - <--2--{"result":null,"jsonrpc":"2.0","id":16}
2019-06-03 00:16:18.511281833 [ThreadId 6] - <--2--{"result":[{"edit":{"documentChanges":[{"edits":[{"range":{"start":{"line":4,"character":7},"end":{"line":4,"character":16}},"newText":"putStrLn"}],"textDocument":{"uri":"file:///home/infinisil/Test/hsimport/new/Main.hs","version":0}}]},"kind":"quickfix","diagnostics":[{"severity":1,"range":{"start":{"line":4,"character":7},"end":{"line":4,"character":16}},"source":"ghcmod","message":"• Variable not in scope: hPutStrLn :: t0 -> [Char] -> IO ()\n• Perhaps you meant ‘putStrLn’ (imported from Prelude)"}],"title":"Replace with putStrLn"}],"jsonrpc":"2.0","id":13}
2019-06-03 00:16:18.806610671 [ThreadId 4] - ---> {"jsonrpc":"2.0","method":"textDocument/hover","params":{"textDocument":{"uri":"file:///home/infinisil/Test/hsimport/new/Main.hs"},"position":{"line":4,"character":0}},"id":18}

2019-06-03 00:16:18.807155366 [ThreadId 10] - ****** reactor: got message number:19
2019-06-03 00:16:18.807315493 [ThreadId 10] - reactor:got HoverRequest:RequestMessage {_jsonrpc = "2.0", _id = IdInt 18, _method = TextDocumentHover, _params = TextDocumentPositionParams {_textDocument = TextDocumentIdentifier {_uri = Uri {getUri = "file:///home/infinisil/Test/hsimport/new/Main.hs"}}, _position = Position {_line = 4, _character = 0}}}
2019-06-03 00:16:18.807483065 [ThreadId 10] - reactor:HoverRequest done
2019-06-03 00:16:18.807586497 [ThreadId 10] - ****** reactor: top of loop
2019-06-03 00:16:18.807681117 [ThreadId 13] - ideDispatcher: got request 19 with id: IdInt 18
2019-06-03 00:16:18.808760242 [ThreadId 13] - ideDispatcher: top of loop
2019-06-03 00:16:18.808961233 [ThreadId 6] - <--2--{"result":null,"jsonrpc":"2.0","id":18}
2019-06-03 00:16:20.639836884 [ThreadId 4] - ---> {"jsonrpc":"2.0","method":"shutdown","params":null,"id":19}

2019-06-03 00:16:20.64018501 [ThreadId 6] - <--2--{"result":"ok","jsonrpc":"2.0","id":19}

I mentioned that it did work for one project, well now it doesn't anymore, and I'm not sure what changed between then (the project itself stayed the same for sure).

What is also a bit weird is that it doesn't seem to show all lines of the diagnostics which it should do in 0.10.0.0 (assuming there's supposed to be more than just "Variable not in scope"), however that does work in another project, so ehh.

@fendor
Copy link
Collaborator Author

fendor commented Jun 3, 2019

This is probably worth its own issue, thank you for reporting in such detail!

@infinisil
Copy link
Contributor

As figured out by @fendor on IRC, this is most likely because I didn't have a Hoogle database. I'll try again later with one, and will investigate if I could ship a database with all-hies directly.

@masaeedu
Copy link

@infinisil any news on shipping a Hoogle database with all-hies?

@infinisil
Copy link
Contributor

While I think it would be possible to wrap the hie executables with HIE_HOOGLE_DATABASE set to some prebuilt database, this would require a bunch of work, because the hoogle generate command doesn't easily work in nix builds because it needs to access the network. Alternatively the nixpkgs package set could be used to generate the database, but that would be really finnicky with getting all stackage packages to build and gluing everything together. I might look into something like this for the future, but for now I don't have the motivation to try this.

Ideally HIE would use what I described in #128

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

add to import list
6 participants