case msg of
SignedIn true ->
( 1, Cmd.none )
SignedIn false ->
( -1, Cmd.none )
And get the following compiler error:
-- REDUNDANT PATTERN ---------------------------------------------- src/Main.elm
The following pattern is redundant. Remove it.
28| SignedIn false ->
^^^^^^^^^^^^^^
Any value with this shape will be handled by a previous pattern.
As a newcomer to Elm I've made a mistake of writing Bool values in small case so that they're interpreted as variables. It would help newcomers to suggest a casing mistake instead when matching Bool values.
I define a message type like this:
And then pattern match on it in update like this:
And get the following compiler error:
As a newcomer to Elm I've made a mistake of writing
Bool
values in small case so that they're interpreted as variables. It would help newcomers to suggest a casing mistake instead when matchingBool
values.