on master help sign in
Switch to new type signatures
d77dbb0Evan Czaplicki
libraries/Prelude.elm+15−15
@@ -26,9 +26,9 @@ fromPolar (r,t) = (r * N.cos t, r * N.sin t)
26toPolar : (Float,Float) -> (Float,Float)
26toPolar : (Float,Float) -> (Float,Float)
27toPolar (x,y) = (N.sqrt (x^2 + y^2), N.atan2 y x)
27toPolar (x,y) = (N.sqrt (x^2 + y^2), N.atan2 y x)
28
28
29−(+) : Number a -> Number a -> Number a
29+(+) : number -> number -> number
30−(-) : Number a -> Number a -> Number a
30+(-) : number -> number -> number
31−(*) : Number a -> Number a -> Number a
31+(*) : number -> number -> number
32
32
33-- Floating point division.
33-- Floating point division.
34(/) : Float -> Float -> Float
34(/) : Float -> Float -> Float
@@ -43,7 +43,7 @@ rem : Int -> Int -> Int
43mod : Int -> Int -> Int
43mod : Int -> Int -> Int
44
44
45-- Exponentiation: `3^2 == 9`
45-- Exponentiation: `3^2 == 9`
46−(^) : Number a -> Number a -> Number a
46+(^) : number -> number -> number
47
47
48cos : Float -> Float
48cos : Float -> Float
49sin : Float -> Float
49sin : Float -> Float
@@ -64,19 +64,19 @@ atan : Float -> Float
64atan2 : Float -> Float -> Float
64atan2 : Float -> Float -> Float
65
65
66-- Take the square root of a number.
66-- Take the square root of a number.
67−sqrt : Number a -> Number a
67+sqrt : number -> number
68
68
69-- Take the absolute value of a number.
69-- Take the absolute value of a number.
70−abs : Number a -> Number a
70+abs : number -> number
71
71
72-- Calculate the logarithm of a number with a given base: `logBase 10 100 == 2`
72-- Calculate the logarithm of a number with a given base: `logBase 10 100 == 2`
73−logBase : Number a -> Number a -> Number a
73+logBase : number -> number -> number
74
74
75-- Given two numbers, returns the smaller one.
75-- Given two numbers, returns the smaller one.
76−min : Number a -> Number a -> Number a
76+min : number -> number -> number
77
77
78-- Given two numbers, returns the larger one.
78-- Given two numbers, returns the larger one.
79−max : Number a -> Number a -> Number a
79+max : number -> number -> number
80
80
81-- Clamps a number within a given range. With the expression `clamp 100 200 x`
81-- Clamps a number within a given range. With the expression `clamp 100 200 x`
82-- the results are as follows:
82-- the results are as follows:
@@ -84,7 +84,7 @@ max : Number a -> Number a -> Number a
84-- * `100 if x < 100`
84-- * `100 if x < 100`
85-- * ` x if 100 <= x < 200`
85-- * ` x if 100 <= x < 200`
86-- * `200 if 200 <= x`
86-- * `200 if 200 <= x`
87−clamp : Number a -> Number a -> Number a -> Number a
87+clamp : number -> number -> number -> number
88
88
89-- An approximation of pi.
89-- An approximation of pi.
90pi : Float
90pi : Float
@@ -96,15 +96,15 @@ e : Float
96(==) : a -> a -> Bool
96(==) : a -> a -> Bool
97(/=) : a -> a -> Bool
97(/=) : a -> a -> Bool
98
98
99−(<) : Comparable a -> Comparable a -> Bool
99+(<) : comparable -> comparable -> Bool
100−(>) : Comparable a -> Comparable a -> Bool
100+(>) : comparable -> comparable -> Bool
101−(<=) : Comparable a -> Comparable a -> Bool
101+(<=) : comparable -> comparable -> Bool
102−(>=) : Comparable a -> Comparable a -> Bool
102+(>=) : comparable -> comparable -> Bool
103
103
104-- Compare any two comparable values. Comparable values include `String`, `Char`,
104-- Compare any two comparable values. Comparable values include `String`, `Char`,
105-- `Int`, `Float`, `Time`, or a list or tuple containing comparable values.
105-- `Int`, `Float`, `Time`, or a list or tuple containing comparable values.
106-- These are also the only values that work as `Dict` keys or `Set` members.
106-- These are also the only values that work as `Dict` keys or `Set` members.
107−compare : Comparable a -> Comparable a -> Order
107+compare : comparable -> comparable -> Order
108
108
109-- Represents the relative ordering of two things.
109-- Represents the relative ordering of two things.
110-- The relations are less than, equal to, and greater than.
110-- The relations are less than, equal to, and greater than.