Renamed to nicklawls/step. That is where the repository lives now. It has not been published as a package under the new name.
Versions published as xilnocas/step still install under that name. 11 versions of 15 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/nicklawls/step.
What we checked: The repo moved to github.com/nicklawls/step. Rebuilt with git archive from commit 18ad678611f3 of https://github.com/nicklawls/step (zip prefix xilnocas-step-18ad678/, America/Los_Angeles times): the zip is byte-identical to the one package.elm-lang.org recorded, SHA-1 0a36bf5a51bb6b0b9bc0ccdd31263ed51c1c8cc7.
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/xilnocas/step/zipball/3.0.0/
Some stuff
Apply a function to the state inside a step, if it's there
Most useful in building a bigger step out of a sub-step you happen to have lying around
Keep the interaction in the state it was in.
NOTE: This will prevent any commands from being returned
Step.stay == (Step.stay |> Step.withCmd myHttpCall)If you want to stay in the same state, but run some commands, use Step.to explicitly
Step.to MySameState |> Step.withCmd myHttpCallRun the first suceeding step, with priority given to the second argument
Intended to be used pipeline style
Step.to { loading = True } |> Step.orElse (Step.to { loading = False }) == Step.to { loading = True }
Step.noop |> Step.orElse Step.to { loading = True } == Step.to { loading = True }Turn a Step into the usual TEA update tuple
It must be a step in an interaction that continues forever. We know it is if the type variable o isn't a specifc type, and can thus be chosen to be Never
If we're stepping to a new state, add an action to fire off
Apply a function to any msgs conteined in the step
Also used for building larger interaction steps out of smaller ones
Map over the output of an interaction, if we've reached the end
Choose a step based on the result of another interaction
You can use this in combination with map and mapMsg to glue the end of one interaction to the beginning of another.
turn an update function that returns a Step to a normal Elm Architecture update function
uses run internally to default with the provided model in case of a stay
starting from an initial state, fold an update function over a list of messages
A helper for building steps out of tasks
Build a step from a normal elm update tuple
Step
A
Step s msg odescribes one step of an interaction. Here's a few things about the interactions we're talking about hersmsgCmds may be fired, potentially producing more messages.o. This might seem a little weird, but it has some nice propertiesStep s msg ois inteneded to be the return value of an update function. It encodes a bunch of common update function patterns, uniting them under a simple mental model, that simultaneously reduces boilerplate and eases composition.