This repository was archived by the owner on Dec 18, 2020. It is now read-only.
File tree Expand file tree Collapse file tree 2 files changed +54
-7
lines changed Expand file tree Collapse file tree 2 files changed +54
-7
lines changed Original file line number Diff line number Diff line change 22
33## Module Global
44
5- ### Values
65
7- infinity :: Number
6+ This module defines types for some global Javascript functions
7+ and values.
88
9- isFinite :: Number -> Boolean
9+ #### ` nan `
1010
11- isNaN :: Number -> Boolean
11+ ``` purescript
12+ nan :: Number
13+ ```
1214
13- nan :: Number
15+ Not a number (NaN)
1416
15- readFloat :: String -> Number
17+ #### ` isNaN `
1618
17- readInt :: Number -> String -> Number
19+ ``` purescript
20+ isNaN :: Number -> Boolean
21+ ```
22+
23+ Test whether a number is NaN
24+
25+ #### ` infinity `
26+
27+ ``` purescript
28+ infinity :: Number
29+ ```
30+
31+ Positive infinity
32+
33+ #### ` isFinite `
34+
35+ ``` purescript
36+ isFinite :: Number -> Boolean
37+ ```
38+
39+ Test whether a number is finite
40+
41+ #### ` readInt `
42+
43+ ``` purescript
44+ readInt :: Number -> String -> Number
45+ ```
46+
47+ Parse an integer from a ` String ` in the specified base
48+
49+ #### ` readFloat `
50+
51+ ``` purescript
52+ readFloat :: String -> Number
53+ ```
54+
55+ Parse a floating point value from a ` String `
Original file line number Diff line number Diff line change 1+ -- | This module defines types for some global Javascript functions
2+ -- | and values.
3+
14module Global
25 ( nan
36 , isNaN
@@ -7,14 +10,19 @@ module Global
710 , readFloat
811 ) where
912
13+ -- | Not a number (NaN)
1014foreign import nan " var nan = NaN;" :: Number
1115
16+ -- | Test whether a number is NaN
1217foreign import isNaN :: Number -> Boolean
1318
19+ -- | Positive infinity
1420foreign import infinity " var infinity = Infinity;" :: Number
1521
22+ -- | Test whether a number is finite
1623foreign import isFinite :: Number -> Boolean
1724
25+ -- | Parse an integer from a `String` in the specified base
1826foreign import readInt
1927 " " "
2028 function readInt(radix) {
@@ -24,5 +32,6 @@ foreign import readInt
2432 }
2533 " " " :: Number -> String -> Number
2634
35+ -- | Parse a floating point value from a `String`
2736foreign import readFloat " var readFloat = parseFloat;" :: String -> Number
2837
You can’t perform that action at this time.
0 commit comments