aboutsummaryrefslogtreecommitdiff
path: root/stdlib/source
diff options
context:
space:
mode:
Diffstat (limited to 'stdlib/source')
-rw-r--r--stdlib/source/lux/data/number.lux10
-rw-r--r--stdlib/source/lux/lang/compiler/extension/analysis/common.lux3
-rw-r--r--stdlib/source/lux/lang/compiler/translation/scheme/extension/common.jvm.lux13
3 files changed, 5 insertions, 21 deletions
diff --git a/stdlib/source/lux/data/number.lux b/stdlib/source/lux/data/number.lux
index df685c150..4ac938ac2 100644
--- a/stdlib/source/lux/data/number.lux
+++ b/stdlib/source/lux/data/number.lux
@@ -132,15 +132,15 @@
[ Min@Monoid<Deg> Deg (:: Interval<Deg> top) d/min]
)
-(do-template [<name> <const> <doc>]
+(do-template [<name> <numerator> <doc>]
[(def: #export <name>
{#.doc <doc>}
Frac
- (<const>))]
+ (f// 0.0 <numerator>))]
- [not-a-number "lux frac not-a-number" "Not-a-number."]
- [positive-infinity "lux frac positive-infinity" "Positive infinity."]
- [negative-infinity "lux frac negative-infinity" "Negative infinity."]
+ [not-a-number 0.0 "Not a number."]
+ [positive-infinity 1.0 "Positive infinity."]
+ [negative-infinity -1.0 "Negative infinity."]
)
(def: #export (not-a-number? number)
diff --git a/stdlib/source/lux/lang/compiler/extension/analysis/common.lux b/stdlib/source/lux/lang/compiler/extension/analysis/common.lux
index ca1c51df9..72453cac5 100644
--- a/stdlib/source/lux/lang/compiler/extension/analysis/common.lux
+++ b/stdlib/source/lux/lang/compiler/extension/analysis/common.lux
@@ -206,9 +206,6 @@
(///bundle.install "smallest" (nullary Frac))
(///bundle.install "min" (nullary Frac))
(///bundle.install "max" (nullary Frac))
- (///bundle.install "not-a-number" (nullary Frac))
- (///bundle.install "positive-infinity" (nullary Frac))
- (///bundle.install "negative-infinity" (nullary Frac))
(///bundle.install "to-deg" (unary Frac Deg))
(///bundle.install "to-int" (unary Frac Int))
(///bundle.install "encode" (unary Frac Text))
diff --git a/stdlib/source/lux/lang/compiler/translation/scheme/extension/common.jvm.lux b/stdlib/source/lux/lang/compiler/translation/scheme/extension/common.jvm.lux
index 02bdd6109..644557bdc 100644
--- a/stdlib/source/lux/lang/compiler/translation/scheme/extension/common.jvm.lux
+++ b/stdlib/source/lux/lang/compiler/translation/scheme/extension/common.jvm.lux
@@ -174,16 +174,6 @@
[frac//max Double::MAX_VALUE _.float]
)
-(do-template [<name> <frac>]
- [(def: (<name> _)
- Nullary
- (_.float <frac>))]
-
- [frac//not-a-number number.not-a-number]
- [frac//positive-infinity number.positive-infinity]
- [frac//negative-infinity number.negative-infinity]
- )
-
(do-template [<name> <op>]
[(def: (<name> [subjectO paramO])
Binary
@@ -252,9 +242,6 @@
(install "smallest" (nullary frac//smallest))
(install "min" (nullary frac//min))
(install "max" (nullary frac//max))
- (install "not-a-number" (nullary frac//not-a-number))
- (install "positive-infinity" (nullary frac//positive-infinity))
- (install "negative-infinity" (nullary frac//negative-infinity))
(install "to-int" (unary _.exact/1))
(install "encode" (unary _.number->string/1))
(install "decode" (unary ///runtime.frac//decode)))))