No matching definitions.

ecs/sized-refined

src/ecs/sized-refined.tur

opt-in strict-aliveness accessors for the REAL

Since: RE1 promotion 2026-07-26

defn

ent-at

(ent-at [i : int] :)

the first-generation entity candidate for slot i.

islot index (the iteration counter)

The Entity (slot i, generation 0).

(GameWorld-alive? w (ent-at 0))

Since: RE1 promotion 2026-07-26

defmacro

sized-defworld-refined

(sized-defworld-refined [world-name])

emit the per-world refined surface anchors:

world-namethe monomorphic sized world type (from sized-defworld-mono)
(sized-defworld-refined GameWorld)
  ;; GameWorld-alive?   : ^borrow GameWorld Entity -> bool  (#reads w)
  ;; GameWorld-despawn! : ^unique ^mut GameWorld Entity -> bool

Since: RE1 promotion 2026-07-26

defmacro

sized-defcomponent-accessor-refined

(sized-defcomponent-accessor-refined [world-name comp-name])

emit `get-<Comp>!`, the

world-namethe monomorphic sized world type
comp-namethe component (a `(SizedDense n Comp)` field on the world)
(sized-defcomponent-accessor-refined GameWorld Pos)
  ;; get-Pos! : ^borrow (ReadCap Pos) ^borrow GameWorld
  ;;            #refine{ x : Entity | (GameWorld-alive? w x) } -> Pos

Since: RE1 promotion 2026-07-26

defmacro

for-each-alive

(for-each-alive [world-name w n binder & body])

run body for each still-alive first-generation entity

world-namethe world TYPE (names the per-world alive? measure)
wthe owned `^mut` world local (borrowed per iteration)
nslot count to scan (slots 0..n-1)
bindername bound to the proven-alive Entity for the body
bodyforms run per alive entity (result discarded; yields 0)
(for-each-alive GameWorld w 3 e
    (println (:: (get-Pos! rcap w e) :int)))

Since: RE1 promotion 2026-07-26