Popularity
9.1
Growing
Activity
8.0
-
56
20
12

Monthly Downloads: 9
Programming language: JavaScript
License: BSD 3-clause "New" or "Revised" License
Tags: Haskell     Tree-sitter    
Latest version: v0.13.0

tree-sitter-haskell alternatives and similar packages

Based on the "Haskell" category.
Alternatively, view tree-sitter-haskell alternatives based on common mentions on social networks and blogs.

Do you think we are missing an alternative of tree-sitter-haskell or a related project?

Add another 'Haskell' Package

README

tree-sitter-haskell

Test the grammar

Haskell grammar for tree-sitter.

Note This grammar needs at least tree-sitter 0.19.4.

References

  • [Haskell 2010 Language Report – Syntax References](ref)
  • [GHC Language Extensions](ext)

Bugs

CPP

Preprocessor #elif and #else directives cannot be handled correctly, since the parser state would have to be manually reset to what it was at the #if. As a workaround, the code blocks in the alternative branches are parsed as part of the directives.

Layout

NondecreasingIndentation is not supported (yet?).

Operators on newlines in do

A strange edge case is when an infix operator follows an expression statement of a do block with an indent of less or equal the do's layout column:

f = do
  readSomething
  >>= doSomething

The >>= causes the do's layout to be terminated, resulting in an AST similar to

f = (do readSomething) >>= doSomething

This is checked heuristically, probably unreliably.