Version
codebase-memory-mcp 0.11.0
Platform
macOS (Apple Silicon)
Install channel
GitHub release archive / install.sh / install.ps1
Binary variant
standard
What happened, and what did you expect?
A top-level Haskell function defined in infix form gets a Function node named after its left operand, and the function itself has no node. This happens with symbolic operators (a <+> b = ... becomes a) and with backtick infix (x `plus` y = ... becomes x). The prefix form works: (!) a b = ... is indexed as (!).
On pandoc (1539a541f):
src/Text/Pandoc/Parsing/General.hs:710 (<+?>) is indexed as a;
src/Text/Pandoc/Readers/Org/Meta.hs:77 (~~>) is indexed as a;
test/Tests/Helpers.hs:154 (=?>) is indexed as x.
The other 29 operators with a type signature in pandoc are indexed as (op).
Expected: (<+>) and plus, as for the prefix form.
Reproduction
repro/M.hs:
module M where
(<+>) :: Int -> Int -> Int
a <+> b = a + b
plus :: Int -> Int -> Int
x `plus` y = x + y
f :: Int
f = 1 <+> 2
codebase-memory-mcp cli index_repository --repo-path repro --name repro
codebase-memory-mcp cli query_graph --project repro --query "MATCH (n) WHERE n.label = 'Function' RETURN n.name, n.start_line, n.end_line ORDER BY n.start_line"
Actual: a (line 4), x (line 7), f (line 10).
Expected: (<+>) (line 4), plus (line 7), f (line 10).
The grammar parses this file without errors (tree-sitter-haskell 0.23.1: root_node.has_error is false). The function nodes on lines 4 and 7 have no name field. Their first child is an infix node (a <+> b, x `plus` y) that holds the operator, so the wrong name comes from extraction, not from parsing.
Confirmations
Version
codebase-memory-mcp 0.11.0
Platform
macOS (Apple Silicon)
Install channel
GitHub release archive / install.sh / install.ps1
Binary variant
standard
What happened, and what did you expect?
A top-level Haskell function defined in infix form gets a Function node named after its left operand, and the function itself has no node. This happens with symbolic operators (
a <+> b = ...becomesa) and with backtick infix (x `plus` y = ...becomesx). The prefix form works:(!) a b = ...is indexed as(!).On pandoc (
1539a541f):src/Text/Pandoc/Parsing/General.hs:710(<+?>) is indexed asa;src/Text/Pandoc/Readers/Org/Meta.hs:77(~~>) is indexed asa;test/Tests/Helpers.hs:154(=?>) is indexed asx.The other 29 operators with a type signature in pandoc are indexed as
(op).Expected:
(<+>)andplus, as for the prefix form.Reproduction
repro/M.hs:Actual:
a(line 4),x(line 7),f(line 10).Expected:
(<+>)(line 4),plus(line 7),f(line 10).The grammar parses this file without errors (
tree-sitter-haskell0.23.1:root_node.has_erroris false). Thefunctionnodes on lines 4 and 7 have nonamefield. Their first child is aninfixnode (a <+> b,x `plus` y) that holds the operator, so the wrong name comes from extraction, not from parsing.Confirmations