Closed lf- closed 6 months ago
awesome!
I don't intend to fix this bug as I'm just too lost on it, so it's fair game if you want to pick it up some time.
(this is not high priority at all though; it affects one file total for me, and is easily worked around by some slight rearrangement or using explicit toplevel splices)
I have done a run of executing tree-sitter-haskell against my employer Mercury's (closed source) codebase (350k LOC) and found a few parser bugs, which I have committed simplified testcases for on https://github.com/lf-/tree-sitter-haskell/tree/top-level-splices-oopsie. I am going to try to fix the ones that I think I can fix over the next few weeks.
I'm filing this incorrect parse as a bug because I am baffled by it and don't know how to fix it. My best guess is that for some reason the function parser gets greedy and ignores the semicolons?
The following test case misparses as a
function
node. Notably, if theinstance
is changed to have an associated value or such, it will parse correctly.AST: