-
Notifications
You must be signed in to change notification settings - Fork 5
Add Haskell parser support (.hs) #141
Description
Problem
Ix does not currently parse .hs files. Haskell source files are treated as unrecognized and excluded from analysis, meaning functional logic, type definitions, and module structure written in Haskell are invisible to the system.
Proposed solution
Add a Haskell parser that can identify and extract:
- Module declarations (e.g.
module MyApp.Utils where) - Import statements (qualified and unqualified)
- Function definitions and type signatures
- Type, newtype, and data declarations
- Typeclass definitions and instances (e.g.
class,instance) - Where and let bindings
- Deriving clauses (e.g.
deriving (Show, Eq))
Support the following file patterns: *.hs
Why it matters
Haskell is used in domains where correctness and strong typing are critical — compilers, financial systems, and formal verification tooling. Its type system and module structure carry significant semantic meaning about how a codebase is organized. Without parsing Haskell, Ix cannot reason about type hierarchies, module dependencies, or the functional architecture of codebases built with it.
Merge requirements
Before this can be merged to main, the following must pass:
- Tested on 3 repos
- No regressions on existing parsers (
ix mapon a known TS/JS repo, verify counts unchanged) - Unit + smoke tests pass (
npm testinix-cli) - Module declarations ingested as entities
- Top-level functions and type signatures resolved as entities
-
data,newtype, andtypedeclarations ingested - Type class definitions (
class) and instances (instance) ingested - CONTAINS chains correctly: module → function/type/class
-
ix textreturns results withlanguage: haskell -
ix containsreturns members for a known Haskell module