buttonFab : msg -> String -> Html.Html msgbuttonFab action icon =Html.button [ onClick action, class "mdl-button mdl-button--fab mdl-button--colored" ][ i [ class "material-icons" ] [ text icon ] ]
type Msg msg= MouseUp| Click pmsgbuttonFab1 : pmsg -> String -> Html.Html msgbuttonFab1 action icon =Html.button [ onClick Click action, onMouseUp MouseUp, class "mdl-button mdl-button--fab mdl-button--colored" ][ i [ class "material-icons" ] [ text icon ] ]
--
You received this message because you are subscribed to the Google Groups "Elm Discuss" group.
To unsubscribe from this group and stop receiving emails from it, send an email to elm-discuss...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
--
If the compiler doesn’t, here goes:
type Msg pmsg
= MouseUp
| Click pmsg
buttonFab1 : pmsg -> String -> Html.Html (Msg pmsg)
buttonFab1 action icon =
Html.button [ onClick (Click action), onMouseUp MouseUp, class "mdl-button mdl-button--fab mdl-button--colored" ]
[ i [ class "material-icons" ] [ text icon ] ]
view : Model -> Html.Html Msgview model =div [][ text (toString model), div [][ buttonFab Inc "add" ], div [][ buttonFab Dec "remove" ]]
Where MDL.Msg is the buttonFab Msg.The type annotation for `view` does not match its definition.
The type annotation is saying:
Model -> Html.Html Msg
But I am inferring that the definition has this type:
Model -> Html.Html (MDL.Msg Msg)
You received this message because you are subscribed to a topic in the Google Groups "Elm Discuss" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/elm-discuss/I3eJK2avJus/unsubscribe.
To unsubscribe from this group and all its topics, send an email to elm-discuss...@googlegroups.com.