Tehnix / ide-haskell-hie

Atom LSP plugin for HIE (Haskell IDE Engine)
https://atom.io/packages/ide-haskell-hie
MIT License
26 stars 6 forks source link

Apply eta reduction doesn't work #22

Open freeman42x opened 6 years ago

freeman42x commented 6 years ago

Having following code:

module Minimal where

test :: [Integer] -> [Integer]
test xs = map (+3) xs

The following messages are printed from LSP debug:

logger.ts:31 Haskell (hie) rpc.sendRequest textDocument/codeAction sending Object {textDocument: Object, range: Object, context: Object}
logger.ts:31 Haskell (hie) rpc.sendRequest textDocument/hover sending Object {textDocument: Object, position: Object}
logger.ts:31 Haskell (hie) rpc.sendRequest textDocument/codeAction received (4ms) [Object]
logger.ts:31 Haskell (hie) rpc.sendRequest textDocument/hover received (6ms) Object {range: Object, contents: Array[2]}
logger.ts:31 Haskell (hie) rpc.sendRequest textDocument/documentHighlight sending Object {textDocument: Object, position: Object}
logger.ts:31 Haskell (hie) rpc.sendRequest textDocument/documentHighlight received (5ms) [Object, Object, Object]
logger.ts:31 Haskell (hie) rpc.sendRequest workspace/executeCommand sending Object {command: "applyrefact:applyOne", arguments: Array[1]}
logger.ts:19 Haskell (hie) stderr 2018-04-01 01:38:21.726652133 [ThreadId 7] - ap
warn @ logger.ts:19
stderr.split.filter.forEach @ auto-languageclient.ts:698
handleServerStderr @ auto-languageclient.ts:698
childProcess.stderr.on @ auto-languageclient.ts:341
emitOne @ events.js:96
emit @ events.js:188
readableAddChunk @ _stream_readable.js:176
Readable.push @ _stream_readable.js:134
onread @ net.js:551
logger.ts:19 Haskell (hie) stderr plyHint:ideas=
warn @ logger.ts:19
stderr.split.filter.forEach @ auto-languageclient.ts:698
handleServerStderr @ auto-languageclient.ts:698
childProcess.stderr.on @ auto-languageclient.ts:341
emitOne @ events.js:96
emit @ events.js:188
readableAddChunk @ _stream_readable.js:176
Readable.push @ _stream_readable.js:134
onread @ net.js:551
logger.ts:19 Haskell (hie) stderr [/tmp/ghc-
warn @ logger.ts:19
stderr.split.filter.forEach @ auto-languageclient.ts:698
handleServerStderr @ auto-languageclient.ts:698
childProcess.stderr.on @ auto-languageclient.ts:341
emitOne @ events.js:96
emit @ events.js:188
readableAddChunk @ _stream_readable.js:176
Readable.push @ _stream_readable.js:134
onread @ net.js:551
logger.ts:19 Haskell (hie) stderr mod23796/Minimal23795-100.hs:1:1: Ignore: Use module export list
warn @ logger.ts:19
stderr.split.filter.forEach @ auto-languageclient.ts:698
handleServerStderr @ auto-languageclient.ts:698
childProcess.stderr.on @ auto-languageclient.ts:341
emitOne @ events.js:96
emit @ events.js:188
readableAddChunk @ _stream_readable.js:176
Readable.push @ _stream_readable.js:134
onread @ net.js:551
logger.ts:19 Haskell (hie) stderr Found
warn @ logger.ts:19
stderr.split.filter.forEach @ auto-languageclient.ts:698
handleServerStderr @ auto-languageclient.ts:698
childProcess.stderr.on @ auto-languageclient.ts:341
emitOne @ events.js:96
emit @ events.js:188
readableAddChunk @ _stream_readable.js:176
Readable.push @ _stream_readable.js:134
onread @ net.js:551
logger.ts:19 Haskell (hie) stderr :
warn @ logger.ts:19
stderr.split.filter.forEach @ auto-languageclient.ts:698
handleServerStderr @ auto-languageclient.ts:698
childProcess.stderr.on @ auto-languageclient.ts:341
emitOne @ events.js:96
emit @ events.js:188
readableAddChunk @ _stream_readable.js:176
Readable.push @ _stream_readable.js:134
onread @ net.js:551
logger.ts:19 Haskell (hie) stderr   module Minimal where
warn @ logger.ts:19
stderr.split.filter.forEach @ auto-languageclient.ts:698
handleServerStderr @ auto-languageclient.ts:698
childProcess.stderr.on @ auto-languageclient.ts:341
emitOne @ events.js:96
emit @ events.js:188
readableAddChunk @ _stream_readable.js:176
Readable.push @ _stream_readable.js:134
onread @ net.js:551
logger.ts:19 Haskell (hie) stderr Why not:
warn @ logger.ts:19
stderr.split.filter.forEach @ auto-languageclient.ts:698
handleServerStderr @ auto-languageclient.ts:698
childProcess.stderr.on @ auto-languageclient.ts:341
emitOne @ events.js:96
emit @ events.js:188
readableAddChunk @ _stream_readable.js:176
Readable.push @ _stream_readable.js:134
onread @ net.js:551
logger.ts:19 Haskell (hie) stderr   module Minimal (module Minimal) wh
warn @ logger.ts:19
stderr.split.filter.forEach @ auto-languageclient.ts:698
handleServerStderr @ auto-languageclient.ts:698
childProcess.stderr.on @ auto-languageclient.ts:341
emitOne @ events.js:96
emit @ events.js:188
readableAddChunk @ _stream_readable.js:176
Readable.push @ _stream_readable.js:134
onread @ net.js:551
logger.ts:19 Haskell (hie) stderr ere
warn @ logger.ts:19
stderr.split.filter.forEach @ auto-languageclient.ts:698
handleServerStderr @ auto-languageclient.ts:698
childProcess.stderr.on @ auto-languageclient.ts:341
emitOne @ events.js:96
emit @ events.js:188
readableAddChunk @ _stream_readable.js:176
Readable.push @ _stream_readable.js:134
onread @ net.js:551
logger.ts:19 Haskell (hie) stderr Note: An explicit list is usually better
warn @ logger.ts:19
stderr.split.filter.forEach @ auto-languageclient.ts:698
handleServerStderr @ auto-languageclient.ts:698
childProcess.stderr.on @ auto-languageclient.ts:341
emitOne @ events.js:96
emit @ events.js:188
readableAddChunk @ _stream_readable.js:176
Readable.push @ _stream_readable.js:134
onread @ net.js:551
logger.ts:19 Haskell (hie) stderr ,/tmp/ghc-mod23796/Minima
warn @ logger.ts:19
stderr.split.filter.forEach @ auto-languageclient.ts:698
handleServerStderr @ auto-languageclient.ts:698
childProcess.stderr.on @ auto-languageclient.ts:341
emitOne @ events.js:96
emit @ events.js:188
readableAddChunk @ _stream_readable.js:176
Readable.push @ _stream_readable.js:134
onread @ net.js:551
logger.ts:19 Haskell (hie) stderr l23795-100.hs:4:1: Warning: Eta reduce
warn @ logger.ts:19
stderr.split.filter.forEach @ auto-languageclient.ts:698
handleServerStderr @ auto-languageclient.ts:698
childProcess.stderr.on @ auto-languageclient.ts:341
emitOne @ events.js:96
emit @ events.js:188
readableAddChunk @ _stream_readable.js:176
Readable.push @ _stream_readable.js:134
onread @ net.js:551
logger.ts:19 Haskell (hie) stderr Found:
warn @ logger.ts:19
stderr.split.filter.forEach @ auto-languageclient.ts:698
handleServerStderr @ auto-languageclient.ts:698
childProcess.stderr.on @ auto-languageclient.ts:341
emitOne @ events.js:96
emit @ events.js:188
readableAddChunk @ _stream_readable.js:176
Readable.push @ _stream_readable.js:134
onread @ net.js:551
logger.ts:19 Haskell (hie) stderr   test xs = map (+ 3) xs
warn @ logger.ts:19
stderr.split.filter.forEach @ auto-languageclient.ts:698
handleServerStderr @ auto-languageclient.ts:698
childProcess.stderr.on @ auto-languageclient.ts:341
emitOne @ events.js:96
emit @ events.js:188
readableAddChunk @ _stream_readable.js:176
Readable.push @ _stream_readable.js:134
onread @ net.js:551
logger.ts:19 Haskell (hie) stderr Why not:
warn @ logger.ts:19
stderr.split.filter.forEach @ auto-languageclient.ts:698
handleServerStderr @ auto-languageclient.ts:698
childProcess.stderr.on @ auto-languageclient.ts:341
emitOne @ events.js:96
emit @ events.js:188
readableAddChunk @ _stream_readable.js:176
Readable.push @ _stream_readable.js:134
onread @ net.js:551
logger.ts:19 Haskell (hie) stderr   test = map (+ 3)
warn @ logger.ts:19
stderr.split.filter.forEach @ auto-languageclient.ts:698
handleServerStderr @ auto-languageclient.ts:698
childProcess.stderr.on @ auto-languageclient.ts:341
emitOne @ events.js:96
emit @ events.js:188
readableAddChunk @ _stream_readable.js:176
Readable.push @ _stream_readable.js:134
onread @ net.js:551
logger.ts:19 Haskell (hie) stderr ]
warn @ logger.ts:19
stderr.split.filter.forEach @ auto-languageclient.ts:698
handleServerStderr @ auto-languageclient.ts:698
childProcess.stderr.on @ auto-languageclient.ts:341
emitOne @ events.js:96
emit @ events.js:188
readableAddChunk @ _stream_readable.js:176
Readable.push @ _stream_readable.js:134
onread @ net.js:551
logger.ts:19 Haskell (hie) stderr 2018-04-01 
warn @ logger.ts:19
stderr.split.filter.forEach @ auto-languageclient.ts:698
handleServerStderr @ auto-languageclient.ts:698
childProcess.stderr.on @ auto-languageclient.ts:341
emitOne @ events.js:96
emit @ events.js:188
readableAddChunk @ _stream_readable.js:176
Readable.push @ _stream_readable.js:134
onread @ net.js:551
logger.ts:19 Haskell (hie) stderr 01:38:21.751718054 [ThreadId 7] - applyHint:diff=WorkspaceEdit {_chang
warn @ logger.ts:19
stderr.split.filter.forEach @ auto-languageclient.ts:698
handleServerStderr @ auto-languageclient.ts:698
childProcess.stderr.on @ auto-languageclient.ts:341
emitOne @ events.js:96
emit @ events.js:188
readableAddChunk @ _stream_readable.js:176
Readable.push @ _stream_readable.js:134
onread @ net.js:551
logger.ts:19 Haskell (hie) stderr es = Just (fromList 
warn @ logger.ts:19
stderr.split.filter.forEach @ auto-languageclient.ts:698
handleServerStderr @ auto-languageclient.ts:698
childProcess.stderr.on @ auto-languageclient.ts:341
emitOne @ events.js:96
emit @ events.js:188
readableAddChunk @ _stream_readable.js:176
Readable.push @ _stream_readable.js:134
onread @ net.js:551
logger.ts:19 Haskell (hie) stderr [(Uri {getUri = "file:///ho
warn @ logger.ts:19
stderr.split.filter.forEach @ auto-languageclient.ts:698
handleServerStderr @ auto-languageclient.ts:698
childProcess.stderr.on @ auto-languageclient.ts:341
emitOne @ events.js:96
emit @ events.js:188
readableAddChunk @ _stream_readable.js:176
Readable.push @ _stream_readable.js:134
onread @ net.js:551
logger.ts:19 Haskell (hie) stderr me/neo/HaskellLearning/IdeTest/src/Minimal.hs"},List [])]), _documentC
warn @ logger.ts:19
stderr.split.filter.forEach @ auto-languageclient.ts:698
handleServerStderr @ auto-languageclient.ts:698
childProcess.stderr.on @ auto-languageclient.ts:341
emitOne @ events.js:96
emit @ events.js:188
readableAddChunk @ _stream_readable.js:176
Readable.push @ _stream_readable.js:134
onread @ net.js:551
logger.ts:19 Haskell (hie) stderr hanges = Nothing}
warn @ logger.ts:19
stderr.split.filter.forEach @ auto-languageclient.ts:698
handleServerStderr @ auto-languageclient.ts:698
childProcess.stderr.on @ auto-languageclient.ts:341
emitOne @ events.js:96
emit @ events.js:188
readableAddChunk @ _stream_readable.js:176
Readable.push @ _stream_readable.js:134
onread @ net.js:551
logger.ts:19 Haskell (hie) stderr 2018-04-01 01:38:21.757890711 [ThreadId 7] - applyOn
warn @ logger.ts:19
stderr.split.filter.forEach @ auto-languageclient.ts:698
handleServerStderr @ auto-languageclient.ts:698
childProcess.stderr.on @ auto-languageclient.ts:341
emitOne @ events.js:96
emit @ events.js:188
readableAddChunk @ _stream_readable.js:176
Readable.push @ _stream_readable.js:134
onread @ net.js:551
logger.ts:19 Haskell (hie) stderr eCmd:file="/home/neo/HaskellLearning/IdeTest/src/Minimal.hs"
warn @ logger.ts:19
stderr.split.filter.forEach @ auto-languageclient.ts:698
handleServerStderr @ auto-languageclient.ts:698
childProcess.stderr.on @ auto-languageclient.ts:341
emitOne @ events.js:96
emit @ events.js:188
readableAddChunk @ _stream_readable.js:176
Readable.push @ _stream_readable.js:134
onread @ net.js:551
logger.ts:19 Haskell (hie) stderr 2018-04-0
warn @ logger.ts:19
stderr.split.filter.forEach @ auto-languageclient.ts:698
handleServerStderr @ auto-languageclient.ts:698
childProcess.stderr.on @ auto-languageclient.ts:341
emitOne @ events.js:96
emit @ events.js:188
readableAddChunk @ _stream_readable.js:176
Readable.push @ _stream_readable.js:134
onread @ net.js:551
logger.ts:19 Haskell (hie) stderr 1 01:38:21.758962877 [ThreadId 7] - applyOneCmd:res=Right (WorkspaceEd
warn @ logger.ts:19
stderr.split.filter.forEach @ auto-languageclient.ts:698
handleServerStderr @ auto-languageclient.ts:698
childProcess.stderr.on @ auto-languageclient.ts:341
emitOne @ events.js:96
emit @ events.js:188
readableAddChunk @ _stream_readable.js:176
Readable.push @ _stream_readable.js:134
onread @ net.js:551
logger.ts:19 Haskell (hie) stderr it {_changes = Just (fromList [(Uri {getUri = "file:///home/neo/Haskel
warn @ logger.ts:19
stderr.split.filter.forEach @ auto-languageclient.ts:698
handleServerStderr @ auto-languageclient.ts:698
childProcess.stderr.on @ auto-languageclient.ts:341
emitOne @ events.js:96
emit @ events.js:188
readableAddChunk @ _stream_readable.js:176
Readable.push @ _stream_readable.js:134
onread @ net.js:551
logger.ts:19 Haskell (hie) stderr lLearning/IdeTest/src/Minimal.hs"},List [])]), _documentChanges = Noth
warn @ logger.ts:19
stderr.split.filter.forEach @ auto-languageclient.ts:698
handleServerStderr @ auto-languageclient.ts:698
childProcess.stderr.on @ auto-languageclient.ts:341
emitOne @ events.js:96
emit @ events.js:188
readableAddChunk @ _stream_readable.js:176
Readable.push @ _stream_readable.js:134
onread @ net.js:551
logger.ts:19 Haskell (hie) stderr ing})
warn @ logger.ts:19
stderr.split.filter.forEach @ auto-languageclient.ts:698
handleServerStderr @ auto-languageclient.ts:698
childProcess.stderr.on @ auto-languageclient.ts:341
emitOne @ events.js:96
emit @ events.js:188
readableAddChunk @ _stream_readable.js:176
Readable.push @ _stream_readable.js:134
onread @ net.js:551
logger.ts:31 Haskell (hie) rpc.sendRequest workspace/executeCommand received (88ms) Object {}
logger.ts:31 Haskell (hie) rpc.onRequest workspace/applyEdit Object {edit: Object}
logger.ts:31 Haskell (hie) rpc.sendRequest textDocument/documentHighlight sending Object {textDocument: Object, position: Object}
logger.ts:31 Haskell (hie) rpc.sendRequest textDocument/documentHighlight received (3ms) []
logger.ts:31 Haskell (hie) rpc.sendRequest textDocument/codeAction sending Object {textDocument: Object, range: Object, context: Object}
logger.ts:31 Haskell (hie) rpc.sendRequest textDocument/hover sending Object {textDocument: Object, position: Object}
logger.ts:31 Haskell (hie) rpc.sendRequest textDocument/codeAction received (4ms) [Object]
logger.ts:31 Haskell (hie) rpc.sendRequest textDocument/hover received (6ms) Object {range: Object, contents: Array[2]}
logger.ts:31 Haskell (hie) rpc.sendRequest textDocument/documentHighlight sending Object {textDocument: Object, position: Object}
logger.ts:31 Haskell (hie) rpc.sendRequest textDocument/documentHighlight received (5ms) [Object, Object, Object]
logger.ts:31 Haskell (hie) rpc.sendRequest workspace/executeCommand sending Object {command: "applyrefact:applyOne", arguments: Array[1]}
logger.ts:19 Haskell (hie) stderr 2018-04-01 01:38:21.726652133 [ThreadId 7] - ap
warn @ logger.ts:19
stderr.split.filter.forEach @ auto-languageclient.ts:698
handleServerStderr @ auto-languageclient.ts:698
childProcess.stderr.on @ auto-languageclient.ts:341
emitOne @ events.js:96
emit @ events.js:188
readableAddChunk @ _stream_readable.js:176
Readable.push @ _stream_readable.js:134
onread @ net.js:551
logger.ts:19 Haskell (hie) stderr plyHint:ideas=
warn @ logger.ts:19
stderr.split.filter.forEach @ auto-languageclient.ts:698
handleServerStderr @ auto-languageclient.ts:698
childProcess.stderr.on @ auto-languageclient.ts:341
emitOne @ events.js:96
emit @ events.js:188
readableAddChunk @ _stream_readable.js:176
Readable.push @ _stream_readable.js:134
onread @ net.js:551
logger.ts:19 Haskell (hie) stderr [/tmp/ghc-
warn @ logger.ts:19
stderr.split.filter.forEach @ auto-languageclient.ts:698
handleServerStderr @ auto-languageclient.ts:698
childProcess.stderr.on @ auto-languageclient.ts:341
emitOne @ events.js:96
emit @ events.js:188
readableAddChunk @ _stream_readable.js:176
Readable.push @ _stream_readable.js:134
onread @ net.js:551
logger.ts:19 Haskell (hie) stderr mod23796/Minimal23795-100.hs:1:1: Ignore: Use module export list
warn @ logger.ts:19
stderr.split.filter.forEach @ auto-languageclient.ts:698
handleServerStderr @ auto-languageclient.ts:698
childProcess.stderr.on @ auto-languageclient.ts:341
emitOne @ events.js:96
emit @ events.js:188
readableAddChunk @ _stream_readable.js:176
Readable.push @ _stream_readable.js:134
onread @ net.js:551
logger.ts:19 Haskell (hie) stderr Found
warn @ logger.ts:19
stderr.split.filter.forEach @ auto-languageclient.ts:698
handleServerStderr @ auto-languageclient.ts:698
childProcess.stderr.on @ auto-languageclient.ts:341
emitOne @ events.js:96
emit @ events.js:188
readableAddChunk @ _stream_readable.js:176
Readable.push @ _stream_readable.js:134
onread @ net.js:551
logger.ts:19 Haskell (hie) stderr :
warn @ logger.ts:19
stderr.split.filter.forEach @ auto-languageclient.ts:698
handleServerStderr @ auto-languageclient.ts:698
childProcess.stderr.on @ auto-languageclient.ts:341
emitOne @ events.js:96
emit @ events.js:188
readableAddChunk @ _stream_readable.js:176
Readable.push @ _stream_readable.js:134
onread @ net.js:551
logger.ts:19 Haskell (hie) stderr   module Minimal where
warn @ logger.ts:19
stderr.split.filter.forEach @ auto-languageclient.ts:698
handleServerStderr @ auto-languageclient.ts:698
childProcess.stderr.on @ auto-languageclient.ts:341
emitOne @ events.js:96
emit @ events.js:188
readableAddChunk @ _stream_readable.js:176
Readable.push @ _stream_readable.js:134
onread @ net.js:551
logger.ts:19 Haskell (hie) stderr Why not:
warn @ logger.ts:19
stderr.split.filter.forEach @ auto-languageclient.ts:698
handleServerStderr @ auto-languageclient.ts:698
childProcess.stderr.on @ auto-languageclient.ts:341
emitOne @ events.js:96
emit @ events.js:188
readableAddChunk @ _stream_readable.js:176
Readable.push @ _stream_readable.js:134
onread @ net.js:551
logger.ts:19 Haskell (hie) stderr   module Minimal (module Minimal) wh
warn @ logger.ts:19
stderr.split.filter.forEach @ auto-languageclient.ts:698
handleServerStderr @ auto-languageclient.ts:698
childProcess.stderr.on @ auto-languageclient.ts:341
emitOne @ events.js:96
emit @ events.js:188
readableAddChunk @ _stream_readable.js:176
Readable.push @ _stream_readable.js:134
onread @ net.js:551
logger.ts:19 Haskell (hie) stderr ere
warn @ logger.ts:19
stderr.split.filter.forEach @ auto-languageclient.ts:698
handleServerStderr @ auto-languageclient.ts:698
childProcess.stderr.on @ auto-languageclient.ts:341
emitOne @ events.js:96
emit @ events.js:188
readableAddChunk @ _stream_readable.js:176
Readable.push @ _stream_readable.js:134
onread @ net.js:551
logger.ts:19 Haskell (hie) stderr Note: An explicit list is usually better
warn @ logger.ts:19
stderr.split.filter.forEach @ auto-languageclient.ts:698
handleServerStderr @ auto-languageclient.ts:698
childProcess.stderr.on @ auto-languageclient.ts:341
emitOne @ events.js:96
emit @ events.js:188
readableAddChunk @ _stream_readable.js:176
Readable.push @ _stream_readable.js:134
onread @ net.js:551
logger.ts:19 Haskell (hie) stderr ,/tmp/ghc-mod23796/Minima
warn @ logger.ts:19
stderr.split.filter.forEach @ auto-languageclient.ts:698
handleServerStderr @ auto-languageclient.ts:698
childProcess.stderr.on @ auto-languageclient.ts:341
emitOne @ events.js:96
emit @ events.js:188
readableAddChunk @ _stream_readable.js:176
Readable.push @ _stream_readable.js:134
onread @ net.js:551
logger.ts:19 Haskell (hie) stderr l23795-100.hs:4:1: Warning: Eta reduce
warn @ logger.ts:19
stderr.split.filter.forEach @ auto-languageclient.ts:698
handleServerStderr @ auto-languageclient.ts:698
childProcess.stderr.on @ auto-languageclient.ts:341
emitOne @ events.js:96
emit @ events.js:188
readableAddChunk @ _stream_readable.js:176
Readable.push @ _stream_readable.js:134
onread @ net.js:551
logger.ts:19 Haskell (hie) stderr Found:
warn @ logger.ts:19
stderr.split.filter.forEach @ auto-languageclient.ts:698
handleServerStderr @ auto-languageclient.ts:698
childProcess.stderr.on @ auto-languageclient.ts:341
emitOne @ events.js:96
emit @ events.js:188
readableAddChunk @ _stream_readable.js:176
Readable.push @ _stream_readable.js:134
onread @ net.js:551
logger.ts:19 Haskell (hie) stderr   test xs = map (+ 3) xs
warn @ logger.ts:19
stderr.split.filter.forEach @ auto-languageclient.ts:698
handleServerStderr @ auto-languageclient.ts:698
childProcess.stderr.on @ auto-languageclient.ts:341
emitOne @ events.js:96
emit @ events.js:188
readableAddChunk @ _stream_readable.js:176
Readable.push @ _stream_readable.js:134
onread @ net.js:551
logger.ts:19 Haskell (hie) stderr Why not:
warn @ logger.ts:19
stderr.split.filter.forEach @ auto-languageclient.ts:698
handleServerStderr @ auto-languageclient.ts:698
childProcess.stderr.on @ auto-languageclient.ts:341
emitOne @ events.js:96
emit @ events.js:188
readableAddChunk @ _stream_readable.js:176
Readable.push @ _stream_readable.js:134
onread @ net.js:551
logger.ts:19 Haskell (hie) stderr   test = map (+ 3)
warn @ logger.ts:19
stderr.split.filter.forEach @ auto-languageclient.ts:698
handleServerStderr @ auto-languageclient.ts:698
childProcess.stderr.on @ auto-languageclient.ts:341
emitOne @ events.js:96
emit @ events.js:188
readableAddChunk @ _stream_readable.js:176
Readable.push @ _stream_readable.js:134
onread @ net.js:551
logger.ts:19 Haskell (hie) stderr ]
warn @ logger.ts:19
stderr.split.filter.forEach @ auto-languageclient.ts:698
handleServerStderr @ auto-languageclient.ts:698
childProcess.stderr.on @ auto-languageclient.ts:341
emitOne @ events.js:96
emit @ events.js:188
readableAddChunk @ _stream_readable.js:176
Readable.push @ _stream_readable.js:134
onread @ net.js:551
logger.ts:19 Haskell (hie) stderr 2018-04-01 
warn @ logger.ts:19
stderr.split.filter.forEach @ auto-languageclient.ts:698
handleServerStderr @ auto-languageclient.ts:698
childProcess.stderr.on @ auto-languageclient.ts:341
emitOne @ events.js:96
emit @ events.js:188
readableAddChunk @ _stream_readable.js:176
Readable.push @ _stream_readable.js:134
onread @ net.js:551
logger.ts:19 Haskell (hie) stderr 01:38:21.751718054 [ThreadId 7] - applyHint:diff=WorkspaceEdit {_chang
warn @ logger.ts:19
stderr.split.filter.forEach @ auto-languageclient.ts:698
handleServerStderr @ auto-languageclient.ts:698
childProcess.stderr.on @ auto-languageclient.ts:341
emitOne @ events.js:96
emit @ events.js:188
readableAddChunk @ _stream_readable.js:176
Readable.push @ _stream_readable.js:134
onread @ net.js:551
logger.ts:19 Haskell (hie) stderr es = Just (fromList 
warn @ logger.ts:19
stderr.split.filter.forEach @ auto-languageclient.ts:698
handleServerStderr @ auto-languageclient.ts:698
childProcess.stderr.on @ auto-languageclient.ts:341
emitOne @ events.js:96
emit @ events.js:188
readableAddChunk @ _stream_readable.js:176
Readable.push @ _stream_readable.js:134
onread @ net.js:551
logger.ts:19 Haskell (hie) stderr [(Uri {getUri = "file:///ho
warn @ logger.ts:19
stderr.split.filter.forEach @ auto-languageclient.ts:698
handleServerStderr @ auto-languageclient.ts:698
childProcess.stderr.on @ auto-languageclient.ts:341
emitOne @ events.js:96
emit @ events.js:188
readableAddChunk @ _stream_readable.js:176
Readable.push @ _stream_readable.js:134
onread @ net.js:551
logger.ts:19 Haskell (hie) stderr me/neo/HaskellLearning/IdeTest/src/Minimal.hs"},List [])]), _documentC
warn @ logger.ts:19
stderr.split.filter.forEach @ auto-languageclient.ts:698
handleServerStderr @ auto-languageclient.ts:698
childProcess.stderr.on @ auto-languageclient.ts:341
emitOne @ events.js:96
emit @ events.js:188
readableAddChunk @ _stream_readable.js:176
Readable.push @ _stream_readable.js:134
onread @ net.js:551
logger.ts:19 Haskell (hie) stderr hanges = Nothing}
warn @ logger.ts:19
stderr.split.filter.forEach @ auto-languageclient.ts:698
handleServerStderr @ auto-languageclient.ts:698
childProcess.stderr.on @ auto-languageclient.ts:341
emitOne @ events.js:96
emit @ events.js:188
readableAddChunk @ _stream_readable.js:176
Readable.push @ _stream_readable.js:134
onread @ net.js:551
logger.ts:19 Haskell (hie) stderr 2018-04-01 01:38:21.757890711 [ThreadId 7] - applyOn
warn @ logger.ts:19
stderr.split.filter.forEach @ auto-languageclient.ts:698
handleServerStderr @ auto-languageclient.ts:698
childProcess.stderr.on @ auto-languageclient.ts:341
emitOne @ events.js:96
emit @ events.js:188
readableAddChunk @ _stream_readable.js:176
Readable.push @ _stream_readable.js:134
onread @ net.js:551
logger.ts:19 Haskell (hie) stderr eCmd:file="/home/neo/HaskellLearning/IdeTest/src/Minimal.hs"
warn @ logger.ts:19
stderr.split.filter.forEach @ auto-languageclient.ts:698
handleServerStderr @ auto-languageclient.ts:698
childProcess.stderr.on @ auto-languageclient.ts:341
emitOne @ events.js:96
emit @ events.js:188
readableAddChunk @ _stream_readable.js:176
Readable.push @ _stream_readable.js:134
onread @ net.js:551
logger.ts:19 Haskell (hie) stderr 2018-04-0
warn @ logger.ts:19
stderr.split.filter.forEach @ auto-languageclient.ts:698
handleServerStderr @ auto-languageclient.ts:698
childProcess.stderr.on @ auto-languageclient.ts:341
emitOne @ events.js:96
emit @ events.js:188
readableAddChunk @ _stream_readable.js:176
Readable.push @ _stream_readable.js:134
onread @ net.js:551
logger.ts:19 Haskell (hie) stderr 1 01:38:21.758962877 [ThreadId 7] - applyOneCmd:res=Right (WorkspaceEd
warn @ logger.ts:19
stderr.split.filter.forEach @ auto-languageclient.ts:698
handleServerStderr @ auto-languageclient.ts:698
childProcess.stderr.on @ auto-languageclient.ts:341
emitOne @ events.js:96
emit @ events.js:188
readableAddChunk @ _stream_readable.js:176
Readable.push @ _stream_readable.js:134
onread @ net.js:551
logger.ts:19 Haskell (hie) stderr it {_changes = Just (fromList [(Uri {getUri = "file:///home/neo/Haskel
warn @ logger.ts:19
stderr.split.filter.forEach @ auto-languageclient.ts:698
handleServerStderr @ auto-languageclient.ts:698
childProcess.stderr.on @ auto-languageclient.ts:341
emitOne @ events.js:96
emit @ events.js:188
readableAddChunk @ _stream_readable.js:176
Readable.push @ _stream_readable.js:134
onread @ net.js:551
logger.ts:19 Haskell (hie) stderr lLearning/IdeTest/src/Minimal.hs"},List [])]), _documentChanges = Noth
warn @ logger.ts:19
stderr.split.filter.forEach @ auto-languageclient.ts:698
handleServerStderr @ auto-languageclient.ts:698
childProcess.stderr.on @ auto-languageclient.ts:341
emitOne @ events.js:96
emit @ events.js:188
readableAddChunk @ _stream_readable.js:176
Readable.push @ _stream_readable.js:134
onread @ net.js:551
logger.ts:19 Haskell (hie) stderr ing})
warn @ logger.ts:19
stderr.split.filter.forEach @ auto-languageclient.ts:698
handleServerStderr @ auto-languageclient.ts:698
childProcess.stderr.on @ auto-languageclient.ts:341
emitOne @ events.js:96
emit @ events.js:188
readableAddChunk @ _stream_readable.js:176
Readable.push @ _stream_readable.js:134
onread @ net.js:551
logger.ts:31 Haskell (hie) rpc.sendRequest workspace/executeCommand received (88ms) Object {}
logger.ts:31 Haskell (hie) rpc.onRequest workspace/applyEdit Object {edit: Object}
logger.ts:31 Haskell (hie) rpc.sendRequest textDocument/documentHighlight sending Object {textDocument: Object, position: Object}
logger.ts:31 Haskell (hie) rpc.sendRequest textDocument/documentHighlight received (3ms) []
freeman42x commented 6 years ago
test :: [Char] -> [Char]
test = reverse

Apply hint: Use String works fine in this case.

Tehnix commented 6 years ago

Hmm, honestly no idea on atm how to solve this.

I can get the following output from HIE --debug,

2018-04-02 01:06:31.200618 [ThreadId 7] - got request with id: Just (IdInt 133)
2018-04-02 01:06:31.201491 [ThreadId 7] - processing request: IdInt 133
2018-04-02 01:06:31.252347 [ThreadId 7] - applyHint:ideas=[/private/var/folders/7w/pg1bypcn3c9_lb_4gtp8swhm0000gn/T/ghc-mod93811/Main93810-33.hs:1:1: Ignore: Use module export list
Found:
  module Main where
Why not:
  module Main (module Main) where
Note: an explicit list is usually better
,/private/var/folders/7w/pg1bypcn3c9_lb_4gtp8swhm0000gn/T/ghc-mod93811/Main93810-33.hs:20:1: Warning: Eta reduce
Found:
  test xs = map (+ 3) xs
Why not:
  test = map (+ 3)
,/private/var/folders/7w/pg1bypcn3c9_lb_4gtp8swhm0000gn/T/ghc-mod93811/Main93810-33.hs:22:10: Suggestion: Use String
Found:
  [Char] -> [Char]
Why not:
  String -> String
,/private/var/folders/7w/pg1bypcn3c9_lb_4gtp8swhm0000gn/T/ghc-mod93811/Main93810-33.hs:23:1: Warning: Eta reduce
Found:
  test2 s = reverse s
Why not:
  test2 = reverse
]
2018-04-02 01:06:31.294872 [ThreadId 7] - applyHint:diff=WorkspaceEdit {_changes = Just (fromList [(Uri {getUri = "file:///Users/tehnix/GitHub/Tehnix/miso-isomorphic-stack/backend/src/Main.hs"},List [])]), _documentChanges = Nothing}
2018-04-02 01:06:31.330026 [ThreadId 7] - applyOneCmd:file="/Users/tehnix/GitHub/Tehnix/miso-isomorphic-stack/backend/src/Main.hs"
2018-04-02 01:06:31.33015 [ThreadId 7] - applyOneCmd:res=Right (WorkspaceEdit {_changes = Just (fromList [(Uri {getUri = "file:///Users/tehnix/GitHub/Tehnix/miso-isomorphic-stack/backend/src/Main.hs"},List [])]), _documentChanges = Nothing})
2018-04-02 01:06:31.330255 [ThreadId 7] - ExecuteCommand response got:r=WorkspaceEdit
2018-04-02 01:06:31.330319 [ThreadId 7] - ExecuteCommand sending edit: RequestMessage {_jsonrpc = "2.0", _id = IdInt 50, _method = WorkspaceApplyEdit, _params = ApplyWorkspaceEditParams {_edit = WorkspaceEdit {_changes = Just (fromList [(Uri {getUri = "file:///Users/tehnix/GitHub/Tehnix/miso-isomorphic-stack/backend/src/Main.hs"},List [])]), _documentChanges = Nothing}}}
2018-04-02 01:06:31.3304 [ThreadId 7] - ghcDispatcher: top of loop
2018-04-02 01:06:31.330543 [ThreadId 5] - <--2--{"result":{},"jsonrpc":"2.0","id":133}
2018-04-02 01:06:31.330644 [ThreadId 5] - <--2--{"jsonrpc":"2.0","id":50,"method":"workspace/applyEdit","params":{"edit":{"changes":{"file:///Users/tehnix/GitHub/Tehnix/miso-isomorphic-stack/backend/src/Main.hs":[]}}}}
2018-04-02 01:06:31.336027 [ThreadId 4] - ---> {"jsonrpc":"2.0","id":50,"result":{"applied":true}}
2018-04-02 01:06:31.336307 [ThreadId 4] - haskell-lsp:Got reply message:"{\"jsonrpc\":\"2.0\",\"id\":50,\"result\":{\"applied\":true}}"
Tehnix commented 6 years ago

Okay, testing in VSCode, applying hints/code actions seem to be broken at the moment :/ I take it this means that the problem lies with HIE itself.

freeman42x commented 6 years ago

@Tehnix Doesn't this work for you:

test :: [Char] -> [Char]
test = reverse

Apply hint: Use String works fine in this case.

It works on my machine with both VSCode and Atom. HIE Version 0.1.0.0 x86_64 ghc-8.2.2

Tehnix commented 6 years ago

It seems it's working again, at least in VSCode.

Btw, if you would like more debug information, you can set a custom executable for HIE in ide-haskell-hie's settings.

One I usually use for debuggin, is,

#!/usr/bin/env bash
DEBUG=1
indent=""
function debug {
  if [[ $DEBUG == 1 ]]; then
    echo "$indent$@" >> /tmp/hie-custom-wrapper.log
  fi
}

curDir=`pwd`
debug "Launching HIE for project located at $curDir"
indent="  "

# Launch the hie for the LTS compiler (assuming built with --copy-compiler-tools).
debug `stack exec -- which hie`
stack exec -- hie --lsp --vomit --debug -l /tmp/hie.log

which enables --vomit on ghc-mod, and logs to /tmp/hie.log, with the debug statements going to /tmp/hie-custom-wrapper.log.

As for what's causing it, I'm still not really sure.