on master help sign in
Add the `String` type alias to Basics and update modules that depend on strings
5d90172Evan Czaplicki
libraries/Basics.elm+7−5
@@ -3,6 +3,8 @@ module Basics where
3
3
4import Native.Basics as Native
4import Native.Basics as Native
5
5
6+type String = [Char]
7+
6-- Convert radians to standard Elm angles (radians).
8-- Convert radians to standard Elm angles (radians).
7radians : Float -> Float
9radians : Float -> Float
8radians t = t
10radians t = t
@@ -55,13 +57,13 @@ mod = Native.mod
55(^) : number -> number -> number
57(^) : number -> number -> number
56(^) = Native.exp
58(^) = Native.exp
57
59
58−cos : Float -> Float
60+cos : Float -> Float
59cos = Native.cos
61cos = Native.cos
60
62
61−sin : Float -> Float
63+sin : Float -> Float
62sin = Native.sin
64sin = Native.sin
63
65
64−tan : Float -> Float
66+tan : Float -> Float
65tan = Native.tan
67tan = Native.tan
66
68
67acos : Float -> Float
69acos : Float -> Float
@@ -198,11 +200,11 @@ show : a -> String
198show = Native.show
200show = Native.show
199
201
200-- Read an integer from a string
202-- Read an integer from a string
201−readInt : String -> Maybe Int
203+-- readInt : String -> Maybe Int
202readInt = Native.readInt
204readInt = Native.readInt
203
205
204-- Read a float from a string.
206-- Read a float from a string.
205−readFloat : String -> Maybe Float
207+-- readFloat : String -> Maybe Float
206readFloat = Native.readFloat
208readFloat = Native.readFloat
207
209
208-- Function Helpers
210-- Function Helpers
libraries/Date.elm+1
@@ -4,6 +4,7 @@
4-- locale formatting or something.
4-- locale formatting or something.
5module Date where
5module Date where
6
6
7+import Basics (String)
7import Native.Date as Native
8import Native.Date as Native
8import Time (Time)
9import Time (Time)
9import Maybe (Maybe)
10import Maybe (Maybe)
libraries/JavaScript.elm+3−2
@@ -2,6 +2,7 @@
2module JavaScript where
2module JavaScript where
3
3
4import Native.JavaScript as Native
4import Native.JavaScript as Native
5+import open Basics
5
6
6data JSNumber = JSNumber
7data JSNumber = JSNumber
7data JSBool = JSBool
8data JSBool = JSBool
@@ -43,7 +44,7 @@ fromBool = Native.fromBool
43fromString : String -> JSString
44fromString : String -> JSString
44fromString = Native.fromString
45fromString = Native.fromString
45
46
46−
47+{--
47-- Turn an `Element` into a plain old DOM node.
48-- Turn an `Element` into a plain old DOM node.
48fromElement : Element -> JSDomNode
49fromElement : Element -> JSDomNode
49fromElement = Native.fromElement
50fromElement = Native.fromElement
@@ -52,4 +53,4 @@ fromElement = Native.fromElement
52-- using the normal `width` and `height` functions.
53-- using the normal `width` and `height` functions.
53toElement : Int -> Int -> JSDomNode -> Element
54toElement : Int -> Int -> JSDomNode -> Element
54toElement = Native.toElement
55toElement = Native.toElement
55−
56+--}