aboutsummaryrefslogtreecommitdiff
path: root/stdlib/source
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--stdlib/source/lux.lux18
-rw-r--r--stdlib/source/lux/data/number/frac.lux10
-rw-r--r--stdlib/source/lux/tool/compiler/phase/extension/analysis/common.lux10
-rw-r--r--stdlib/source/spec/compositor/generation/common.lux14
-rw-r--r--stdlib/source/test/lux/tool/compiler/phase/extension/analysis/common.lux26
5 files changed, 39 insertions, 39 deletions
diff --git a/stdlib/source/lux.lux b/stdlib/source/lux.lux
index 6fe8100ba..be997fc2e 100644
--- a/stdlib/source/lux.lux
+++ b/stdlib/source/lux.lux
@@ -2373,7 +2373,7 @@
[ Int "lux i64 =" "lux int <" i/= i/< i/<= i/> i/>=
"Int(eger) equivalence." "Int(eger) less-than." "Int(eger) less-than-equal." "Int(eger) greater-than." "Int(eger) greater-than-equal."]
- [Frac "lux frac =" "lux frac <" f/= f/< f/<= f/> f/>=
+ [Frac "lux f64 =" "lux f64 <" f/= f/< f/<= f/> f/>=
"Frac(tion) equivalence." "Frac(tion) less-than." "Frac(tion) less-than-equal." "Frac(tion) greater-than." "Frac(tion) greater-than-equal."]
)
@@ -2441,11 +2441,11 @@
[ Int i// "lux int /" "Int(eger) division."]
[ Int i/% "lux int %" "Int(eger) remainder."]
- [Frac f/+ "lux frac +" "Frac(tion) addition."]
- [Frac f/- "lux frac -" "Frac(tion) substraction."]
- [Frac f/* "lux frac *" "Frac(tion) multiplication."]
- [Frac f// "lux frac /" "Frac(tion) division."]
- [Frac f/% "lux frac %" "Frac(tion) remainder."]
+ [Frac f/+ "lux f64 +" "Frac(tion) addition."]
+ [Frac f/- "lux f64 -" "Frac(tion) substraction."]
+ [Frac f/* "lux f64 *" "Frac(tion) multiplication."]
+ [Frac f// "lux f64 /" "Frac(tion) division."]
+ [Frac f/% "lux f64 %" "Frac(tion) remainder."]
)
(def:''' #export (r/* param subject)
@@ -2608,7 +2608,7 @@
(def:''' (frac@encode x)
#Nil
(-> Frac Text)
- ("lux frac encode" x))
+ ("lux f64 encode" x))
(def:''' (multiple? div n)
#Nil
@@ -5183,8 +5183,8 @@
(-> <from> <to>)
(<proc> n))]
- [frac-to-int Frac Int "lux frac int"]
- [int-to-frac Int Frac "lux int frac"]
+ [frac-to-int Frac Int "lux f64 i64"]
+ [int-to-frac Int Frac "lux int f64"]
)
(def: (find-baseline-column code)
diff --git a/stdlib/source/lux/data/number/frac.lux b/stdlib/source/lux/data/number/frac.lux
index 7c5f52b7f..5a816df33 100644
--- a/stdlib/source/lux/data/number/frac.lux
+++ b/stdlib/source/lux/data/number/frac.lux
@@ -49,8 +49,8 @@
[addition f/+ +0.0]
[multiplication f/* +1.0]
- [maximum f/max ("lux frac min")]
- [minimum f/min ("lux frac max")]
+ [maximum f/max ("lux f64 min")]
+ [minimum f/min ("lux f64 max")]
)
(template [<name> <numerator> <doc>]
@@ -78,11 +78,11 @@
(structure: #export decimal (Codec Text Frac)
(def: (encode x)
(if (f/< +0.0 x)
- ("lux frac encode" x)
- ("lux text concat" "+" ("lux frac encode" x))))
+ ("lux f64 encode" x)
+ ("lux text concat" "+" ("lux f64 encode" x))))
(def: (decode input)
- (case ("lux frac decode" [input])
+ (case ("lux f64 decode" [input])
(#.Some value)
(#error.Success value)
diff --git a/stdlib/source/lux/tool/compiler/phase/extension/analysis/common.lux b/stdlib/source/lux/tool/compiler/phase/extension/analysis/common.lux
index 20061db55..7afbb3331 100644
--- a/stdlib/source/lux/tool/compiler/phase/extension/analysis/common.lux
+++ b/stdlib/source/lux/tool/compiler/phase/extension/analysis/common.lux
@@ -172,12 +172,12 @@
(///bundle.install "/" (binary Int Int Int))
(///bundle.install "%" (binary Int Int Int))
(///bundle.install "<" (binary Int Int Bit))
- (///bundle.install "frac" (unary Int Frac))
+ (///bundle.install "f64" (unary Int Frac))
(///bundle.install "char" (unary Int Text)))))
-(def: bundle::frac
+(def: bundle::f64
Bundle
- (<| (///bundle.prefix "frac")
+ (<| (///bundle.prefix "f64")
(|> ///bundle.empty
(///bundle.install "+" (binary Frac Frac Frac))
(///bundle.install "-" (binary Frac Frac Frac))
@@ -189,7 +189,7 @@
(///bundle.install "smallest" (nullary Frac))
(///bundle.install "min" (nullary Frac))
(///bundle.install "max" (nullary Frac))
- (///bundle.install "int" (unary Frac Int))
+ (///bundle.install "i64" (unary Frac Int))
(///bundle.install "encode" (unary Frac Text))
(///bundle.install "decode" (unary Text (type (Maybe Frac)))))))
@@ -213,7 +213,7 @@
(dictionary.merge (bundle::lux eval))
(dictionary.merge bundle::i64)
(dictionary.merge bundle::int)
- (dictionary.merge bundle::frac)
+ (dictionary.merge bundle::f64)
(dictionary.merge bundle::text)
(dictionary.merge bundle::io)
)))
diff --git a/stdlib/source/spec/compositor/generation/common.lux b/stdlib/source/spec/compositor/generation/common.lux
index c92859639..8ed524efe 100644
--- a/stdlib/source/spec/compositor/generation/common.lux
+++ b/stdlib/source/spec/compositor/generation/common.lux
@@ -157,15 +157,15 @@
(run (..sanitize <extension>))
(//case.verify <reference>)))]
- ["lux f64 min" ("lux frac min")]
- ["lux f64 max" ("lux frac max")]
- ["lux f64 smallest" ("lux frac smallest")]
+ ["lux f64 min" ("lux f64 min")]
+ ["lux f64 max" ("lux f64 max")]
+ ["lux f64 smallest" ("lux f64 smallest")]
))
- (_.test "'lux f64 to-i64' && 'lux i64 to-f64'"
- (|> (run (..sanitize "lux f64 to-i64")
+ (_.test "'lux f64 i64 && 'lux i64 f64'"
+ (|> (run (..sanitize "lux f64 i64")
(|> subject synthesis.f64
- (list) (#synthesis.Extension "lux f64 to-i64")
- (list) (#synthesis.Extension "lux i64 to-f64")))
+ (list) (#synthesis.Extension "lux f64 i64")
+ (list) (#synthesis.Extension "lux i64 f64")))
(//case.verify subject)))
))))
diff --git a/stdlib/source/test/lux/tool/compiler/phase/extension/analysis/common.lux b/stdlib/source/test/lux/tool/compiler/phase/extension/analysis/common.lux
index 7980118a0..b6f7fb10c 100644
--- a/stdlib/source/test/lux/tool/compiler/phase/extension/analysis/common.lux
+++ b/stdlib/source/test/lux/tool/compiler/phase/extension/analysis/common.lux
@@ -120,31 +120,31 @@
encodedC (|> r.safe-frac (:: @ map (|>> %f code.text)))]
($_ _.and
(_.test "Can add frac numbers."
- (check-success+ "lux frac +" (list paramC subjectC) Frac))
+ (check-success+ "lux f64 +" (list paramC subjectC) Frac))
(_.test "Can subtract frac numbers."
- (check-success+ "lux frac -" (list paramC subjectC) Frac))
+ (check-success+ "lux f64 -" (list paramC subjectC) Frac))
(_.test "Can multiply frac numbers."
- (check-success+ "lux frac *" (list paramC subjectC) Frac))
+ (check-success+ "lux f64 *" (list paramC subjectC) Frac))
(_.test "Can divide frac numbers."
- (check-success+ "lux frac /" (list paramC subjectC) Frac))
+ (check-success+ "lux f64 /" (list paramC subjectC) Frac))
(_.test "Can calculate remainder of frac numbers."
- (check-success+ "lux frac %" (list paramC subjectC) Frac))
+ (check-success+ "lux f64 %" (list paramC subjectC) Frac))
(_.test "Can test equivalence of frac numbers."
- (check-success+ "lux frac =" (list paramC subjectC) Bit))
+ (check-success+ "lux f64 =" (list paramC subjectC) Bit))
(_.test "Can compare frac numbers."
- (check-success+ "lux frac <" (list paramC subjectC) Bit))
+ (check-success+ "lux f64 <" (list paramC subjectC) Bit))
(_.test "Can obtain minimum frac number."
- (check-success+ "lux frac min" (list) Frac))
+ (check-success+ "lux f64 min" (list) Frac))
(_.test "Can obtain maximum frac number."
- (check-success+ "lux frac max" (list) Frac))
+ (check-success+ "lux f64 max" (list) Frac))
(_.test "Can obtain smallest frac number."
- (check-success+ "lux frac smallest" (list) Frac))
+ (check-success+ "lux f64 smallest" (list) Frac))
(_.test "Can convert frac number to integer."
- (check-success+ "lux frac int" (list subjectC) Int))
+ (check-success+ "lux f64 i64" (list subjectC) Int))
(_.test "Can convert frac number to text."
- (check-success+ "lux frac encode" (list subjectC) Text))
+ (check-success+ "lux f64 encode" (list subjectC) Text))
(_.test "Can convert text to frac number."
- (check-success+ "lux frac decode" (list encodedC) (type (Maybe Frac))))
+ (check-success+ "lux f64 decode" (list encodedC) (type (Maybe Frac))))
)))
(def: text