Skip to content

feat: add Haskell language support - #1561

Open
mightybyte wants to merge 1 commit into
colbymchenry:mainfrom
mightybyte:feat/haskell-language-support
Open

feat: add Haskell language support#1561
mightybyte wants to merge 1 commit into
colbymchenry:mainfrom
mightybyte:feat/haskell-language-support

Conversation

@mightybyte

Copy link
Copy Markdown

Add full Haskell (.hs, .lhs) support to CodeGraph's extraction pipeline:

  • Functions with multi-clause grouping, type signatures, and Haddock docs
  • Type classes as traits, instances with implements edges
  • Algebraic data types as structs, constructors as enum_members, record fields
  • Type synonyms, newtypes
  • Module imports with dotted module names (Data.List, etc.)
  • Call edges: local calls, qualified calls (Mod.fn), data constructor instantiations, and infix operator calls (user-defined operators only)
  • where-clause helper extraction

Grammar: vendored tree-sitter-haskell 0.23.1 wasm (ABI 14) from the npm package — tree-sitter-wasms doesn't ship Haskell.

Validated on three repos by size tier:

  • xmonad/xmonad (small, 41 files, 1222 nodes, 2208 edges)
  • PostgREST/postgrest (medium, 192 files, 5531 nodes, 9386 edges)
  • jgm/pandoc (large, 599 files, 23126 nodes, 52180 edges)

All 630 extraction tests pass (19 new Haskell tests + 611 existing).

Add full Haskell (.hs, .lhs) support to CodeGraph's extraction pipeline:

- Functions with multi-clause grouping, type signatures, and Haddock docs
- Type classes as traits, instances with implements edges
- Algebraic data types as structs, constructors as enum_members, record fields
- Type synonyms, newtypes
- Module imports with dotted module names (Data.List, etc.)
- Call edges: local calls, qualified calls (Mod.fn), data constructor
  instantiations, and infix operator calls (user-defined operators only)
- where-clause helper extraction

Grammar: vendored tree-sitter-haskell 0.23.1 wasm (ABI 14) from the npm
package — tree-sitter-wasms doesn't ship Haskell.

Validated on three repos by size tier:
- xmonad/xmonad (small, 41 files, 1222 nodes, 2208 edges)
- PostgREST/postgrest (medium, 192 files, 5531 nodes, 9386 edges)
- jgm/pandoc (large, 599 files, 23126 nodes, 52180 edges)

All 630 extraction tests pass (19 new Haskell tests + 611 existing).
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant