{ model | gameData = Dict.insert model.game { game | players = List.Extra.unique (List.append game.players [ model.player ]) } }
--ERROR
I cannot update the `gameData` field like this:
85| { model | gameData = Dict.insert model.game { game | players = List.Extra.unique (List.append game.players [ model.player ]) } }
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
This `insert` call produces:
Dict String { players : List String }
-> Dict String { players : List String }
But it should be:
Dict String Game
Note: The record update syntax does not allow you to change the type of fields.
You can achieve that with record constructors or the record literal syntax.
--ERROR
I cannot update the `gameData` field like this:
88| { model | gameData = Dict.insert model.game { players = [ model.player ] } }
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
This `insert` call produces:
Dict String { players : List String }
-> Dict String { players : List String }
But it should be:
Dict String Game
Note: The record update syntax does not allow you to change the type of fields.
You can achieve that with record constructors or the record literal syntax.
These work.
But these give worry error
OH