Files
codebase-memory-mcp/internal/cbm/grammar_haskell.c
T
wargloom 4e8eed19f9 fix(parser): use alias-safe Haskell arrays
Preload the shared Tree-sitter array helpers before the pinned Haskell scanner so optimized builds do not retain a stale contents pointer across realloc. Keep a compile-time signature guard to prevent regression.

Fixes #1231

Signed-off-by: wargloom <wargloom@gmail.com>
2026-07-23 18:40:22 +03:00

9 lines
557 B
C

// 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"