Problem
Data/Unit.purs in the purescript-lua-prelude fork opens with -- @inline unit always, added on the assumption that unit is the cheapest possible thing to inline. The assumption is inverted: the FFI value ({}) is a table constructor, so every inlined copy allocates a fresh table at runtime — e.g. an allocation per void step in Effect loops — where a reference to the foreign singleton allocates nothing. Seven inlined {} in the linked Data.Array output alone.
Approach
Change the pragma to -- @inline unit never (or drop it) in the Data/Unit.purs FFI, release the fork, and bump the package set.
Prerequisites / Relations
Depends on #175: the compiler must honor never for foreign export names before the pragma has any effect. And because #175 also makes table constructors never-duplicated by default, this flip becomes documentation of intent rather than the fix itself. Otherwise independent — a fork-side edit plus a release and package-set bump.
Verification / Measurement
Linked output contains a single {} for unit; eval goldens unchanged — in particular Array Unit printing (the #23 class) must not move.
Problem
Data/Unit.pursin the purescript-lua-prelude fork opens with-- @inline unit always, added on the assumption that unit is the cheapest possible thing to inline. The assumption is inverted: the FFI value({})is a table constructor, so every inlined copy allocates a fresh table at runtime — e.g. an allocation pervoidstep in Effect loops — where a reference to the foreign singleton allocates nothing. Seven inlined{}in the linkedData.Arrayoutput alone.Approach
Change the pragma to
-- @inline unit never(or drop it) in theData/Unit.pursFFI, release the fork, and bump the package set.Prerequisites / Relations
Depends on #175: the compiler must honor
neverfor foreign export names before the pragma has any effect. And because #175 also makes table constructors never-duplicated by default, this flip becomes documentation of intent rather than the fix itself. Otherwise independent — a fork-side edit plus a release and package-set bump.Verification / Measurement
Linked output contains a single
{}for unit; eval goldens unchanged — in particularArray Unitprinting (the #23 class) must not move.