aboutsummaryrefslogtreecommitdiff
path: root/stdlib
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--stdlib/source/lux.lux44
-rw-r--r--stdlib/source/lux/data/text.lux2
-rw-r--r--stdlib/source/lux/tool/compiler/default/syntax.lux2
-rw-r--r--stdlib/source/lux/tool/compiler/phase/extension/analysis/common.lux10
-rw-r--r--stdlib/source/spec/compositor/generation/common.lux12
-rw-r--r--stdlib/source/test/lux/tool/compiler/phase/extension/analysis/common.lux12
6 files changed, 38 insertions, 44 deletions
diff --git a/stdlib/source/lux.lux b/stdlib/source/lux.lux
index be997fc2e..0e231eb3a 100644
--- a/stdlib/source/lux.lux
+++ b/stdlib/source/lux.lux
@@ -6,11 +6,11 @@
(0)))])
("lux def" double-quote
- ("lux int char" +34)
+ ("lux i64 char" +34)
[dummy-cursor (10 (0))])
("lux def" new-line
- ("lux int char" +10)
+ ("lux i64 char" +10)
[dummy-cursor (10 (0))])
("lux def" __paragraph
@@ -1160,7 +1160,7 @@
#.Nil))
(#Function Nat (#Function Nat Nat))
("lux coerce" Nat
- ("lux int *"
+ ("lux i64 *"
("lux coerce" Int param)
("lux coerce" Int subject))))
@@ -2238,10 +2238,10 @@
(-> Nat Nat Bit)
(let' [referenceH (high-bits reference)
sampleH (high-bits sample)]
- (if ("lux int <" referenceH sampleH)
+ (if ("lux i64 <" referenceH sampleH)
#1
(if ("lux i64 =" referenceH sampleH)
- ("lux int <"
+ ("lux i64 <"
(low-bits reference)
(low-bits sample))
#0))))
@@ -2370,7 +2370,7 @@
#1
(<eq-proc> reference sample)))]
- [ Int "lux i64 =" "lux int <" i/= i/< i/<= i/> i/>=
+ [ Int "lux i64 =" "lux i64 <" 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 f64 =" "lux f64 <" f/= f/< f/<= f/> f/>=
@@ -2381,15 +2381,15 @@
(list [(tag$ ["lux" "doc"])
(text$ "Nat(ural) division.")])
(-> Nat Nat Nat)
- (if ("lux int <" +0 ("lux coerce" Int param))
+ (if ("lux i64 <" +0 ("lux coerce" Int param))
(if (n/< param subject)
0
1)
(let' [quotient (|> subject
("lux i64 logical-right-shift" 1)
- ("lux int /" ("lux coerce" Int param))
+ ("lux i64 /" ("lux coerce" Int param))
("lux i64 left-shift" 1))
- flat ("lux int *"
+ flat ("lux i64 *"
("lux coerce" Int param)
("lux coerce" Int quotient))
remainder ("lux i64 -" flat subject)]
@@ -2402,7 +2402,7 @@
(text$ "Nat(ural) [division remainder].")])
(-> Nat Nat (#Product Nat Nat))
(let' [div (n// param subject)
- flat ("lux int *"
+ flat ("lux i64 *"
("lux coerce" Int param)
("lux coerce" Int div))]
[div ("lux i64 -" flat subject)]))
@@ -2411,7 +2411,7 @@
(list [(tag$ ["lux" "doc"])
(text$ "Nat(ural) remainder.")])
(-> Nat Nat Nat)
- (let' [flat ("lux int *"
+ (let' [flat ("lux i64 *"
("lux coerce" Int param)
("lux coerce" Int (n// param subject)))]
("lux i64 -" flat subject)))
@@ -2437,9 +2437,9 @@
(-> <type> <type> <type>)
(<op> param subject))]
- [ Int i/* "lux int *" "Int(eger) multiplication."]
- [ Int i// "lux int /" "Int(eger) division."]
- [ Int i/% "lux int %" "Int(eger) remainder."]
+ [ Int i/* "lux i64 *" "Int(eger) multiplication."]
+ [ Int i// "lux i64 /" "Int(eger) division."]
+ [ Int i/% "lux i64 %" "Int(eger) remainder."]
[Frac f/+ "lux f64 +" "Frac(tion) addition."]
[Frac f/- "lux f64 -" "Frac(tion) substraction."]
@@ -2457,12 +2457,12 @@
paramH (high-bits param)
paramL (low-bits param)
bottom (|> subjectL
- ("lux int *" paramL)
+ ("lux i64 *" paramL)
("lux i64 logical-right-shift" 32))
middle ("lux i64 +"
- ("lux int *" paramL subjectH)
- ("lux int *" paramH subjectL))
- top ("lux int *" subjectH paramH)]
+ ("lux i64 *" paramL subjectH)
+ ("lux i64 *" paramH subjectL))
+ top ("lux i64 *" subjectH paramH)]
(|> bottom
("lux i64 +" middle)
high-bits
@@ -2495,8 +2495,8 @@
shift ("lux i64 -" trailing-zeroes 64)
numerator ("lux i64 left-shift" shift 1)]
(|> ("lux coerce" Int numerator)
- ("lux int /" ("lux coerce" Int denominator))
- ("lux int *" ("lux coerce" Int subject))
+ ("lux i64 /" ("lux coerce" Int denominator))
+ ("lux i64 *" ("lux coerce" Int subject))
("lux coerce" Rev)))))
(def:''' #export (r/% param subject)
@@ -2512,7 +2512,7 @@
(text$ "Rev(olution) scale.")])
(-> Nat Rev Rev)
(|> ("lux coerce" Int subject)
- ("lux int *" ("lux coerce" Int param))
+ ("lux i64 *" ("lux coerce" Int param))
("lux coerce" Rev)))
(def:''' #export (r/reciprocal numerator)
@@ -5184,7 +5184,7 @@
(<proc> n))]
[frac-to-int Frac Int "lux f64 i64"]
- [int-to-frac Int Frac "lux int f64"]
+ [int-to-frac Int Frac "lux i64 f64"]
)
(def: (find-baseline-column code)
diff --git a/stdlib/source/lux/data/text.lux b/stdlib/source/lux/data/text.lux
index 856481560..a9cec1526 100644
--- a/stdlib/source/lux/data/text.lux
+++ b/stdlib/source/lux/data/text.lux
@@ -21,7 +21,7 @@
## (The JVM specifies chars as 16-bit unsigned integers)
(def: #export from-code
(-> Char Text)
- (|>> (:coerce Int) "lux int char"))
+ (|>> (:coerce Int) "lux i64 char"))
(template [<code> <short> <long>]
[(def: #export <long> (from-code <code>))
diff --git a/stdlib/source/lux/tool/compiler/default/syntax.lux b/stdlib/source/lux/tool/compiler/default/syntax.lux
index 788a492cd..e63fd742f 100644
--- a/stdlib/source/lux/tool/compiler/default/syntax.lux
+++ b/stdlib/source/lux/tool/compiler/default/syntax.lux
@@ -80,7 +80,7 @@
(<extension> reference subject))]
[!n/= "lux i64 ="]
- [!i/< "lux int <"]
+ [!i/< "lux i64 <"]
)
(template [<name> <extension>]
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 7afbb3331..dd645886f 100644
--- a/stdlib/source/lux/tool/compiler/phase/extension/analysis/common.lux
+++ b/stdlib/source/lux/tool/compiler/phase/extension/analysis/common.lux
@@ -160,18 +160,13 @@
(///bundle.install "left-shift" (binary Nat I64* I64))
(///bundle.install "logical-right-shift" (binary Nat I64* I64))
(///bundle.install "arithmetic-right-shift" (binary Nat I64* I64))
+ (///bundle.install "=" (binary I64* I64* Bit))
+ (///bundle.install "<" (binary Int Int Bit))
(///bundle.install "+" (binary I64* I64* I64))
(///bundle.install "-" (binary I64* I64* I64))
- (///bundle.install "=" (binary I64* I64* Bit)))))
-
-(def: bundle::int
- Bundle
- (<| (///bundle.prefix "int")
- (|> ///bundle.empty
(///bundle.install "*" (binary Int Int Int))
(///bundle.install "/" (binary Int Int Int))
(///bundle.install "%" (binary Int Int Int))
- (///bundle.install "<" (binary Int Int Bit))
(///bundle.install "f64" (unary Int Frac))
(///bundle.install "char" (unary Int Text)))))
@@ -212,7 +207,6 @@
(|> ///bundle.empty
(dictionary.merge (bundle::lux eval))
(dictionary.merge bundle::i64)
- (dictionary.merge bundle::int)
(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 8ed524efe..c837c30a3 100644
--- a/stdlib/source/spec/compositor/generation/common.lux
+++ b/stdlib/source/spec/compositor/generation/common.lux
@@ -86,11 +86,11 @@
false)
(let [subject <subject-expr>])))]
- ["lux i64 to-f64" Frac int-to-frac f/= subject]
- ["lux i64 char" Text (|>> (:coerce Nat) text.from-code) text@= (|> subject
- (:coerce Nat)
- (n/% (i64.left-shift 8 1))
- (:coerce Int))]
+ ["lux i64 f64" Frac int-to-frac f/= subject]
+ ["lux i64 char" Text (|>> (:coerce Nat) text.from-code) text@= (|> subject
+ (:coerce Nat)
+ (n/% (i64.left-shift 8 1))
+ (:coerce Int))]
))
(~~ (template [<extension> <reference> <outputT> <comp>]
[(_.test <extension>
@@ -270,7 +270,7 @@
(run (..sanitize "lux text char"))
(case> (^multi (#error.Success valueV)
[(:coerce (Maybe Int) valueV) (#.Some valueV)])
- (text.contains? ("lux int char" valueV)
+ (text.contains? ("lux i64 char" valueV)
sample-lower)
_
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 b6f7fb10c..e45656025 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
@@ -99,17 +99,17 @@
paramC (|> r.int (:: @ map code.int))]
($_ _.and
(_.test "Can multiply integers."
- (check-success+ "lux int *" (list paramC subjectC) Int))
+ (check-success+ "lux i64 *" (list paramC subjectC) Int))
(_.test "Can divide integers."
- (check-success+ "lux int /" (list paramC subjectC) Int))
+ (check-success+ "lux i64 /" (list paramC subjectC) Int))
(_.test "Can calculate remainder of integers."
- (check-success+ "lux int %" (list paramC subjectC) Int))
+ (check-success+ "lux i64 %" (list paramC subjectC) Int))
(_.test "Can compare integers."
- (check-success+ "lux int <" (list paramC subjectC) Bit))
+ (check-success+ "lux i64 <" (list paramC subjectC) Bit))
(_.test "Can convert integer to text."
- (check-success+ "lux int char" (list subjectC) Text))
+ (check-success+ "lux i64 char" (list subjectC) Text))
(_.test "Can convert integer to fraction."
- (check-success+ "lux int frac" (list subjectC) Frac))
+ (check-success+ "lux i64 f64" (list subjectC) Frac))
)))
(def: frac