Skip to content

Local code intelligence for developers and AI agents. Connect code, docs and infrastructure in a persistent graph, with CBM Lens, MCP tools, agent integrations and change-aware test selection.

fix(parser): use alias-safe Haskell arrays

wargloom4e8eed19f931
diff --git a/internal/cbm/grammar_haskell.c b/internal/cbm/grammar_haskell.c
index 58b70b7bf..61f67956a 100644
--- a/internal/cbm/grammar_haskell.c
+++ b/internal/cbm/grammar_haskell.c
@@ -1,4 +1,8 @@
// Vendored tree-sitter grammar: haskell
// Each grammar compiled as separate unit (conflicting static symbols).
+#include "vendored/common/tree_sitter/array.h" // strict-aliasing-safe helpers (tree-sitter#5242)
+typedef void *(*cbm_haskell_array_grow_fn)(void *, uint32_t, uint32_t *, uint32_t, size_t);
+_Static_assert(_Generic(&_array__grow, cbm_haskell_array_grow_fn: 1, default: 0),
+ "Haskell scanner requires strict-aliasing-safe array helpers");
#include "vendored/grammars/haskell/parser.c"
#include "vendored/grammars/haskell/scanner.c"