on master help sign in
Add the `String` type alias to Basics and update modules that depend on strings
commit5d901721f1c14176b38debbe6a17c8c9ad467bbb authorEvan Czaplicki <info@elm-lang.org> dateMon 29 Jul 2013, 15:49 (13 years ago) parenta767024
3 files changed+11−7
libraries/Basics.elm+7−5 libraries/Date.elm+1 libraries/JavaScript.elm+3−2
libraries/Basics.elm+7−5
@@ -3,6 +3,8 @@ module Basics where
33
44import Native.Basics as Native
55
6+type String = [Char]
7+
68-- Convert radians to standard Elm angles (radians).
79radians : Float -> Float
810radians t = t
@@ -55,13 +57,13 @@ mod = Native.mod
5557(^) : number -> number -> number
5658(^) = Native.exp
5759
58−cos : Float -> Float
60+cos : Float -> Float
5961cos = Native.cos
6062
61−sin : Float -> Float
63+sin : Float -> Float
6264sin = Native.sin
6365
64−tan : Float -> Float
66+tan : Float -> Float
6567tan = Native.tan
6668
6769acos : Float -> Float
@@ -198,11 +200,11 @@ show : a -> String
198200show = Native.show
199201
200202-- Read an integer from a string
201−readInt : String -> Maybe Int
203+-- readInt : String -> Maybe Int
202204readInt = Native.readInt
203205
204206-- Read a float from a string.
205−readFloat : String -> Maybe Float
207+-- readFloat : String -> Maybe Float
206208readFloat = Native.readFloat
207209
208210-- Function Helpers
libraries/Date.elm+1
@@ -4,6 +4,7 @@
44-- locale formatting or something.
55module Date where
66
7+import Basics (String)
78import Native.Date as Native
89import Time (Time)
910import Maybe (Maybe)
libraries/JavaScript.elm+3−2
@@ -2,6 +2,7 @@
22module JavaScript where
33
44import Native.JavaScript as Native
5+import open Basics
56
67data JSNumber = JSNumber
78data JSBool = JSBool
@@ -43,7 +44,7 @@ fromBool = Native.fromBool
4344fromString : String -> JSString
4445fromString = Native.fromString
4546
46−
47+{--
4748-- Turn an `Element` into a plain old DOM node.
4849fromElement : Element -> JSDomNode
4950fromElement = Native.fromElement
@@ -52,4 +53,4 @@ fromElement = Native.fromElement
5253-- using the normal `width` and `height` functions.
5354toElement : Int -> Int -> JSDomNode -> Element
5455toElement = Native.toElement
55−
56+--}