HORIZON HASKELLDocslts/ghc-10.0.x8fef28d2026-11-02Search packagesCtrl K
Theme: |

GHC 10.0.0.20260917 · lts/ghc-10.0.x · 8fef28d · 2026-11-02

Moduleapecs-0.10.1Haskell2010

Apecs.System

Synopsis
  • Packageapecs-0.10.1
  • Exports17
  • LanguageHaskell2010
  • LicenceBSD-3-Clause
  • SourceSystem.hs
valueset :: Set w m c => Entity -> c -> SystemT w m ()

Writes a Component to a given Entity. Will overwrite existing Components.

value($=) :: Set w m c => Entity -> c -> SystemT w m ()

Writes a Component to a given Entity. Will overwrite existing Components.

set operator

valuecmap
  1. :: (Get w m cx, Members w m cx, Set w m cy)
  2. => cx -> cy
  3. -> SystemT w m ()

Maps a function over all entities with a cx, and writes their cy.

valuecmapIf
  1. :: (Get w m cx, Get w m cp, Members w m cx, Set w m cy)
  2. => cp -> Bool
  3. -> cx -> cy
  4. -> SystemT w m ()

Conditional cmap, that first tests whether the argument satisfies some property. The entity needs to have both a cx and cp component.

valuecfold :: (Members w m c, Get w m c) => (a -> c -> a) -> a -> SystemT w m a

Fold over the game world; for example, cfold max (minBound :: Foo) will find the maximum value of Foo. Strict in the accumulator.

valuecollect
  1. :: (Get w m components, Members w m components)
  2. => components -> Maybe a
  3. -> SystemT w m [a]

Collect matching components into a list by using the specified test/process function. You can use this to preprocess data before returning. And you can do a test here that depends on data from multiple components. Pass Just to simply collect all the items.