blob: 6eedb7f79b3bc59f04b953f35cc7c0ad3ed856e4 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
|
module Update
( Action(..)
, actions
, updateModel
) where
import Model exposing (Model)
import Model.Payment exposing (Payments)
type Action =
NoOp
| UpdatePayments Payments
actions : Signal.Mailbox Action
actions = Signal.mailbox NoOp
updateModel : Action -> Model -> Model
updateModel action model =
case action of
NoOp ->
model
UpdatePayments payments ->
{ model | payments <- payments }
|