tricycle/system-actor-model/4.0.0

NOTE: the latest version is 9.0.0

Renamed to bellroy/system-actor-model. That is where the repository lives now. It has not been published as a package under the new name.

Versions published as tricycle/system-actor-model still install under that name. 26 versions of 26 come from the new location (see their notes).

Rerouted (renamed, verified). The GitHub user or repository was renamed. The tag is still there, at the new name. The Lamdera package server serves a copy recovered from https://github.com/bellroy/system-actor-model.

What we checked: The repo moved to github.com/bellroy/system-actor-model. Rebuilt with git archive from commit 1514b66f3da6 of https://github.com/bellroy/system-actor-model (zip prefix tricycle-system-actor-model-e357cdd/, America/Los_Angeles times): the zip is byte-identical to the one package.elm-lang.org recorded, SHA-1 7c01e2db3224ca09010fcf0693d77353fa053dad.

The Lamdera compiler uses this copy and prints a one-line notice saying so. elm itself fails to download this version.

Details · package.elm-lang.org's zip: https://github.com/tricycle/system-actor-model/zipball/4.0.0/

System.Event

Event Handling

type alias EventHandler msgIn =
EventHandler msgIn

A System Event Handler

default : EventHandler msgIn

Let the System decide what to do

ignore : EventHandler msgIn

Ignore the event

beforeDefault : msgIn -> EventHandler msgIn

Before the default behaviour respond with a custom msgIn

custom : msgIn -> EventHandler msgIn

Ignore the default behaviour and respond with a custom msgIn

Component

Your components can receive Events that are being spawned by the System. It's up to your component to handle these.

type alias ComponentEventHandlers msgIn =
{ onPIDNotFound : PID -> EventHandler msgIn
, onKill : EventHandler msgIn
}

Components need to supply the following event handlers

systemDefault : ComponentEventHandlers msgIn

You can choose to apply a sytem default behaviour

It might be easy to start with systemDefault when specifying your components event handlers.

{ systemDefault | onKill = beforeDefault SaveProgress }
ignoreAll : ComponentEventHandlers msgIn

You can choose to ignore all events