module Update ( Action(..) , actions , updateModel ) where import Model exposing (Model) import Model.Payment exposing (Payments) type Action = NoOp | Forbidden | UpdatePayments Payments actions : Signal.Mailbox Action actions = Signal.mailbox NoOp updateModel : Action -> Model -> Model updateModel action model = case action of NoOp -> model Forbidden -> { model | forbiddenAccess <- True } UpdatePayments payments -> { model | payments <- Just payments }