opvasger/amr/1.0.0

NOTE: the latest version is 3.1.1

Unavailable. Nobody can download this version any more, with elm or with the Lamdera compiler: github.com/opvasger/amr is gone (deleted or private); Software Heritage not asked yet (this run's --swh-calls were used up); no fork with tag 1.0.0 found (32 same-name repos checked); no cached copy. Use another version.

Details

AMR

This module helps you set up an Elm Program for development.

Automatic message-replay solves the same problem as "hot-reloading" - in the sense that your application won't lose state during development. It does however differ in that, since the interactions are recorded rather than the state itself, you get to change virtually any part of your program without breaking replay.

Interactions recorded is based on the message-value that the elm-architecture employs. If you remove or modify any of these, you will obviously change the behavior of message-replay - This module will replay all message up until the first that is unrecognized.

{ encodeMsg : msg -> Value
, msgDecoder : Decoder msg
, fromCache : flags -> Maybe String
, toCache : String -> Cmd (Msg msg)
}
-> { init : flags -> Url -> Key -> ( model, Cmd msg )
, update : msg -> model -> ( model, Cmd msg )
, subscriptions : model -> Sub msg
, view : model -> Document msg
, onUrlChange : Url -> msg
, onUrlRequest : UrlRequest -> msg
}
-> Program flags model msg

This API mirrors elm/browser.

You can find documentation for here if you don't know it yet!

type alias Program flags model msg =
Program flags (Model model) (Msg msg)

A program with automatic message-replay enabled.

A nice trick to toggle between this kind of program and the production-build is to insert both constructors side-by-side and commenting out the one your currently using