Hello, sorry if this is a dupe - I'm brand new to elm so I'm not quite sure what terms to use when searching.
I was changing the elm architecture part 3 to include the ID of each counter on the page, when I made a mistake:
viewCounter : Signal.Address Action -> ( ID, Counter.Model ) -> Html
viewCounter address ( id, model ) =
div
[]
[ (text id)
, Counter.view (Signal.forwardTo address (Modify id)) model
]
The mistake is that I've failed to convert the id param into the string needed by text.
However, the build error is:
-- TYPE MISMATCH ------------------------------------------- ././CounterList.elm
The argument to function `Modify` is causing a mismatch.
96│ Modify id)
^^
Function `Modify` is expecting the argument to be:
Int
But it is:
String
Detected errors in 1 module.
Whereas I'd expect to get the error against the text call.
Hello, sorry if this is a dupe - I'm brand new to elm so I'm not quite sure what terms to use when searching.
I was changing the elm architecture part 3 to include the ID of each counter on the page, when I made a mistake:
The mistake is that I've failed to convert the
id
param into the string needed bytext
.However, the build error is:
Whereas I'd expect to get the error against the
text
call.