elm / error-message-catalog

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

Compiler hint for toString #266

Open ckoster22 opened 6 years ago

ckoster22 commented 6 years ago

The error message for trying to use toString to convert an Int to a String currently reads like this:

image

SSCCE

This seems like it could be a common enough mistake to give a more helpful error message indicating Basics.toString is no longer available, and maybe they meant Debug.toString, String.fromInt, or String.fromFloat.

r1sc commented 6 years ago

I stumbled on this today and it took me quite a while to figure out what was going on.

johantiden commented 5 years ago

Same here. All the tutorials out there are just specifying toString without any classifiers. Very frustrating to get into Elm when not even the basic tutorials will compile on your machine.

YannickLeRoux commented 4 years ago

Thank you! Couldnt find String.fromInt anywhere :)