error-message-catalog icon indicating copy to clipboard operation
error-message-catalog copied to clipboard

Compiler hint for toString

Open ckoster22 opened this issue 6 years ago • 3 comments

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.

ckoster22 avatar Aug 26 '18 02:08 ckoster22

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

r1sc avatar Aug 30 '18 15:08 r1sc

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.

johantiden avatar Oct 04 '18 18:10 johantiden

Thank you! Couldnt find String.fromInt anywhere :)

YannickLeRoux avatar Nov 30 '19 23:11 YannickLeRoux