on master help sign in
Rely directly on Native.Show.show when needed
commit10506b5663c5b1e020844d7d6417ed356f0dcee2 authorEvan Czaplicki <info@elm-lang.org> dateSat 1 Mar 2014, 22:07 (13 years ago) parentae513a7
3 files changed+4−4
libraries/Native/String.js−2 libraries/String.elm+2−1 libraries/Text.elm+2−1
libraries/Native/String.js−2
@@ -10,7 +10,6 @@ Elm.Native.String.make = function(elm) {
1010 var Maybe = Elm.Maybe.make(elm);
1111 var JS = Elm.JavaScript.make(elm);
1212 var Utils = Elm.Native.Utils.make(elm);
13− var show = Elm.Native.Show.make(elm);
1413
1514 function isEmpty(str) {
1615 return str.length === 0;
@@ -244,7 +243,6 @@ Elm.Native.String.make = function(elm) {
244243 endsWith: F2(endsWith),
245244 indexes: F2(indexes),
246245
247− show:show,
248246 toInt: toInt,
249247 toFloat: toFloat,
250248 toList: toList,
libraries/String.elm+2−1
@@ -28,6 +28,7 @@ Cosmetic operations such as padding with extra characters or trimming whitespace
2828@docs map, filter, foldl, foldr, any, all
2929-}
3030
31+import Native.Show
3132import Native.String
3233import Maybe (Maybe)
3334
@@ -284,7 +285,7 @@ indices = Native.String.indexes
284285 show [1,2] == "[1,2]"
285286-}
286287show : a -> String
287−show = Native.String.show
288+show = Native.Show.show
288289
289290{-| Try to convert a string into an int, failing on improperly formatted strings.
290291
libraries/Text.elm+2−1
@@ -30,6 +30,7 @@ import Color (Color, black)
3030import Graphics.Element (Element, Three, Pos, ElementPrim, Properties)
3131import Maybe (Maybe, Nothing)
3232import JavaScript (JSString)
33+import Native.Show
3334import Native.Text
3435
3536data Text = Text
@@ -145,4 +146,4 @@ Excellent for debugging.
145146-}
146147asText : a -> Element
147148asText value =
148− leftAligned (monospace (toText (String.show value)))
149+ leftAligned (monospace (toText (Native.Show.show value)))