Skip to content

Commit 95ad0bd

Browse files
committed
ADD: Bounded Number instance.
1 parent da4e752 commit 95ad0bd

File tree

2 files changed

+10
-0
lines changed

2 files changed

+10
-0
lines changed

Diff for: src/Data/Bounded.js

+3
Original file line numberDiff line numberDiff line change
@@ -5,3 +5,6 @@ exports.bottomInt = -2147483648;
55

66
exports.topChar = String.fromCharCode(65535);
77
exports.bottomChar = String.fromCharCode(0);
8+
9+
exports.topNumber = Number.POSITIVE_INFINITY;
10+
exports.bottomNumber = Number.NEGATIVE_INFINITY;

Diff for: src/Data/Bounded.purs

+7
Original file line numberDiff line numberDiff line change
@@ -44,3 +44,10 @@ instance boundedOrdering :: Bounded Ordering where
4444
instance boundedUnit :: Bounded Unit where
4545
top = unit
4646
bottom = unit
47+
48+
foreign import topNumber :: Number
49+
foreign import bottomNumber :: Number
50+
51+
instance boundedNumber :: Bounded Number where
52+
top = topNumber
53+
bottom = bottomNumber

0 commit comments

Comments
 (0)