These are chat archives for carymrobbins/intellij-haskforce

27th
Sep 2016
Cary Robbins
@carymrobbins
Sep 27 2016 19:19
@rahulmutt, @LeanderK - One problem I've thought about regarding using GHC's parser is that IntelliJ's parser needs to be able to recover pretty well
Leander Kurscheidt
@LeanderK
Sep 27 2016 19:20
what do you mean with recover?
Cary Robbins
@carymrobbins
Sep 27 2016 19:20
From what I understand, this is something GHC may be lacking
e.g. If a user is typing code, we don't want the rest of the file to cease to parse
We want it to pick up parsing as soon as it can
It doesn't need to be perfect, but it does need to be able to recover at some point, otherwise things like autocomplete and jump to definition don't work very well
Leander Kurscheidt
@LeanderK
Sep 27 2016 19:23
ah now i get what you mean. I have no idea how good the parser is handling that
Cary Robbins
@carymrobbins
Sep 27 2016 19:23
From previous discussion, I got the impression that GHC doesn't recover well, however, it may have changed since then
we might be able to get away with patching it somewhat, but the further we deviate the harder it is to upgrade when GHC updates its parser
Leander Kurscheidt
@LeanderK
Sep 27 2016 19:24
or reuse existing constructs like type holes
replacing all the unfinished code with type holes ;)
Cary Robbins
@carymrobbins
Sep 27 2016 19:25
well, i'd prefer to not push the problem onto the user
the goal with the parser is to be something the user doesn't even have to worry about, it should "just work"
Leander Kurscheidt
@LeanderK
Sep 27 2016 19:26
yeah, of course
Cary Robbins
@carymrobbins
Sep 27 2016 20:14
this seems interesting and may be worth looking over - https://ghc.haskell.org/trac/ghc/wiki/Commentary/Compiler/Parser