tricycle/system-actor-model/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 9a46500d69a6 of https://github.com/bellroy/system-actor-model (zip prefix tricycle-system-actor-model-a6a79c7/, America/Los_Angeles times): the zip is byte-identical to the one package.elm-lang.org recorded, SHA-1 ae26d0b97c302af6987839e48a3a0a62b09d6628.

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/9.0.0/

System.Browser

This module helps you set up an System Program.

Applications

Create an application that manages Url changes.

When the application starts, init gets the initial Url. You can show different things depending on the Url!

When someone clicks a link, like

Home

, it always goes through onUrlRequest. The resulting message goes to your update function, giving you a chance to save scroll position or persist data before changing the URL yourself with pushUrl or load. More info on this in the UrlRequest docs!

When the URL changes, the new Url goes through onUrlChange. The resulting message goes to update where you can decide what to show next.

Applications always use the Browser.Navigation module for precise control over Url changes.

{ apply :
appModel
-> SystemActor
appModel
output
(SystemMessage addresses actors appMsg)
, factory :
actors
-> ( PID, Value )
-> ( appModel, SystemMessage addresses actors appMsg )
, init :
flags -> Url -> Key -> List (SystemMessage addresses actors appMsg)
, view :
List output
-> List (Html (SystemMessage addresses actors appMsg))
, onUrlRequest :
UrlRequest -> SystemMessage addresses actors appMsg
, onUrlChange : Url -> SystemMessage addresses actors appMsg
, onLogMessage :
LogMessage addresses actors appMsg
-> SystemMessage addresses actors appMsg
}
-> Program flags addresses actors appModel appMsg

Create an Application managed by Elm through a System

Elements

Create an HTML element managed by Elm.

{ apply :
appModel
-> SystemActor
appModel
output
(SystemMessage addresses actors appMsg)
, factory :
actors
-> ( PID, Value )
-> ( appModel, SystemMessage addresses actors appMsg )
, init : flags -> List (SystemMessage addresses actors appMsg)
, view :
List output -> Html (SystemMessage addresses actors appMsg)
, onLogMessage :
LogMessage addresses actors appMsg
-> SystemMessage addresses actors appMsg
}
-> Program flags addresses actors appModel appMsg

Create an HTML element managed by Elm through a System.

Use alternative programs

Get the records that are used to create the Elm Browser.application and .element

{ apply :
appModel
-> SystemActor
appModel
output
(SystemMessage addresses actors appMsg)
, factory :
actors
-> ( PID, Value )
-> ( appModel, SystemMessage addresses actors appMsg )
, init :
flags -> Url -> Key -> List (SystemMessage addresses actors appMsg)
, view :
List output
-> List (Html (SystemMessage addresses actors appMsg))
, onUrlRequest :
UrlRequest -> SystemMessage addresses actors appMsg
, onUrlChange : Url -> SystemMessage addresses actors appMsg
, onLogMessage :
LogMessage addresses actors appMsg
-> SystemMessage addresses actors appMsg
}
-> { init :
flags
-> Url
-> Key
-> ( SystemModel addresses actors appModel
, Cmd (SystemMessage addresses actors appMsg)
)
, onUrlChange : Url -> SystemMessage addresses actors appMsg
, onUrlRequest :
UrlRequest -> SystemMessage addresses actors appMsg
, subscriptions :
SystemModel addresses1 actors1 appModel
-> Sub (SystemMessage addresses actors appMsg)
, update :
SystemMessage addresses actors appMsg
-> SystemModel addresses actors appModel
-> ( SystemModel addresses actors appModel
, Cmd (SystemMessage addresses actors appMsg)
)
, view :
SystemModel addresses actors appModel
-> Document (SystemMessage addresses actors appMsg)
}

Returns the record that is used by Browser.application

{ apply :
appModel
-> SystemActor
appModel
output
(SystemMessage addresses actors appMsg)
, factory :
actors
-> ( PID, Value )
-> ( appModel, SystemMessage addresses actors appMsg )
, init : flags -> List (SystemMessage addresses actors appMsg)
, view :
List output -> Html (SystemMessage addresses actors appMsg)
, onLogMessage :
LogMessage addresses actors appMsg
-> SystemMessage addresses actors appMsg
}
-> { init :
flags
-> ( SystemModel addresses actors appModel
, Cmd (SystemMessage addresses actors appMsg)
)
, subscriptions :
SystemModel addresses actors appModel
-> Sub (SystemMessage addresses actors appMsg)
, update :
SystemMessage addresses actors appMsg
-> SystemModel addresses actors appModel
-> ( SystemModel addresses actors appModel
, Cmd (SystemMessage addresses actors appMsg)
)
, view :
SystemModel addresses actors appModel
-> Html (SystemMessage addresses actors appMsg)
}

Returns the record that is used by Browser.element

Program

type alias Program flags addresses actors appModel applicationMsg =
Program
flags
(SystemModel addresses actors appModel)
(SystemMessage addresses actors applicationMsg)

This will be the type of your program when you create it using this package.

Checkout out the element and application functions in the System.Browser module to find out how to create a System.Program.

A Program describes an Elm program! How does it react to input? Does it show anything on screen? Etc.