anchor.diff:      let archetypes = dictPlus<ArchetypeId, Archetype> HashIdentity.Structural []
       let archetypeSlots = dictPlus<uint64, ArchetypeSlot> HashIdentity.Structural []
       let componentTypes = dictPlus<string, Type> HashIdentity.Structural []
  -    let subscriptions = dictPlus<string, Dictionary<EcsEventType, Dictionary<uint32, obj>>> HashIdentity.Structural []
  +    let subscriptions = dictPlus<EcsEvent, Dictionary<uint32, obj>> HashIdentity.Structural []
       let queries = List<IQuery> ()
   
       let createArchetype (archetypeId : ArchetypeId) =
  
positive.code: // TODO: 3D: remove any incidental allocation.
  // TODO: 3D: make sure to use proper collection comparer for string keys.
  // TODO: 3D: make sure to use TryAdd in the appropriate places.
  // TODO: 3D: combine eventName and event into a single key?
  // TODO: 3D: abstract ArchetypeId.
  
  /// Allows a value to always pass as equal with another of its same type.
  
negative.code:         (eventData : 'd)
          (state : 's) : 's =
          let mutable state = state
          match subscriptions.TryGetValue event with
          | (true, callbacks) ->
              for entry in callbacks do
                  match entry.Value with
                  | :? EcsCallback<obj, 's> as objCallback ->
                      let evt = { EcsEventData = eventData :> obj }
                      state <- objCallback evt this state
                  | _ -> ()
          | (false, _) -> ()
          state
  
      member this.PublishAsync<'d, 's> event (eventData : 'd) =
          let vsync =
              match subscriptions.TryGetValue event with
              | (true, callbacks) ->
                  callbacks |>
                  Seq.map (fun entry ->
                      Task.Run (fun () ->
                          match entry.Value with
                          | :? EcsCallback<obj, 's> as objCallback ->
                              let evt = { EcsEventData = eventData :> obj }
                              objCallback evt this Unchecked.defaultof<'s> |> ignore<'s>
                          | _ -> ()) |> Vsync.AwaitTask) |>
                  Vsync.Parallel
              | (false, _) -> Vsync.Parallel []
          Vsync.StartAsTask vsync
  
  