elm / error-message-catalog

A catalog of broken Elm programs / data to improve error messages
BSD 3-Clause "New" or "Revised" License
174 stars 17 forks source link

Port type error #173

Open dbulic opened 8 years ago

dbulic commented 8 years ago
- PORT ERROR --------------------------------------------------------- Main.elm

Port `chartData` has an invalid type.

43| port chartData : Model -> Cmd Msg
    ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
You are saying it should be:

    Main.Model -> Platform.Cmd.Cmd Main.Msg

But you need to use the particular format described here:
<http://guide.elm-lang.org/effect_managers/>

Two problems: 1) That pages doesn't mention at all what's that "particular" format 2) I would prefer it to be an actual link

I would even more prefer to tell me how to rewrite that line - the only change needed seems to be

port chartData : Model -> Cmd msg
ffigiel commented 8 years ago

I wanted to open the same issue, luckily I didn't create a duplicate. What do you mean by actual link?

dbulic commented 8 years ago

Text

<http://guide.elm-lang.org/effect_managers/>

should be a live link to http://guide.elm-lang.org/effect_managers/

ffigiel commented 8 years ago

I still don't get it. You're using a terminal, right? It's up to a terminal to handle links. Sometimes you need to press alt or shift and then click on the link.

dbulic commented 8 years ago

No, I am using elm-reactor, so the error is displayed in browser on port 8000.

jvoigtlaender commented 8 years ago

Part 1) of the opening comment here has already been addressed: https://github.com/elm-lang/elm-compiler/commit/24e4c84834f5987b9f9e539995a505d63c633838.

ffigiel commented 8 years ago

And about the second part, I believe there should be a separate issue for support for URLs in elm-reactor