blob: b96d89958d3db0bb3e68ff3719a8f80afbb5fad0 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
|
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 }
|