Closed mpizenberg closed 5 years ago
I believe this was fixed by https://github.com/elm/compiler/commit/a5febad184588ae79b404d22a020020408580041#diff-82d62175c52da5d84448be854f237b66. My development build is producing:
-- TYPE MISMATCH ------------------------------------------------------ temp.elm
The 1st argument to `worker` is not what I expect:
5| Platform.worker
6|> { init = \_ -> ( (), Cmd.none )
7|> -- should be \_ _ -> ...
8|> , update = \_ -> ( (), Cmd.none )
9|> , subscriptions = \_ -> Sub.none
10|> }
This argument is a record of type:
{ init : flags -> ( (), Cmd msg1 )
, subscriptions : () -> Sub msg1
, update : msg1 -> ( (), Cmd msg )
}
But `worker` needs the 1st argument to be:
{ init : flags -> ( (), Cmd msg1 )
, subscriptions : () -> Sub msg1
, update : msg1 -> () -> ( (), Cmd msg1 )
}
Hint: It looks like it takes too few arguments. I was expecting 1 more.
So the Hint
is a little weird, but the bug you are seeing is resolved. The fix should become available once Elm 0.19.1 is released!
Code with missing parameter in update:
Error message: