tree-sitter / tree-sitter-haskell

Haskell grammar for tree-sitter.
MIT License
151 stars 36 forks source link

exp_section_right not parsed when containing a hash #108

Closed felixroos closed 3 months ago

felixroos commented 8 months ago

an expression like (+ x) y is parsed correctly, whereas (# x) y yields an error. Interestingly, it works when prefixing a space. I guess this must be a bug?

tek commented 7 months ago

yeah the grammar behaves as if UnboxedTuples is always enabled, in which case (# is a parse error in GCC as well if not followed by a closing #). I haven't figured out a way to support both so far; this is complicated even further by the fact that symbolic operators are handled in the C extension code, so I doubt that this is feasible.

yaxu commented 7 months ago

That's a shame, # is used as an operator quite often in Haskell, including in the popular diagrams and tidal libraries.

felixroos commented 3 months ago

awesome, thanks so much for all your work! I can confirm this now works on my end :) it seems to chew everything i throw at it