def publish
bendvy-ecs-core@0.1.0.4 · relation_reorder.bend:29
import bendvy-ecs-core@0.1.0.4/relation_reorder.bend as RelationReorder
import Base
import entity_key.bend as Key
import relation_types.bend as G
import relation_commands.bend as A
import world.bend as W
29def publish(~S:Data,~C:Type,~R:Type,~E:Data,observed:W.World<S,A.Store<S,C>,R,A.Notice<S,E>> & Maybe<&2,G.Error>,d:G.Descriptor<S>,+parent:Key.Key) -> W.World<S,A.Store<S,C>,R,A.Notice<S,E>>:
30 match observed:
31 case (world,None{}): world
32 case (world,Some{+error}): W.event_publish(~S,~A.Store<S,C>,~R,~A.Notice<S,E>,world,[A.RelationFailed{G.Failure{d,G.ReorderChildren{},parent,error_target(error,parent),error}}])