Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Cannot find toString

Tags:

elm

I'm trying to use the Basics.toString function:

type Foo = Bar | Baz

main = text (toString Bar)

which, according to the Basics documentation, should be imported by default, but I'm getting a compile error:

I cannot find a `toString` variable:

13| main = text (toString Bar)

What am I missing?

like image 723
Simon Morgan Avatar asked May 11 '19 13:05

Simon Morgan


1 Answers

Basics.toString was removed in version 0.19:

You'll need to use one of Debug.toString, String.fromInt or String.fromFloat, depending on the type of Bar.

like image 173
Captain Hat Avatar answered Oct 05 '22 00:10

Captain Hat