diff options
12 files changed, 5 insertions, 111 deletions
diff --git a/new-luxc/source/luxc/lang/translation/common-lisp/procedure/common.jvm.lux b/new-luxc/source/luxc/lang/translation/common-lisp/procedure/common.jvm.lux index 6ac2d6a0a..e1ba0494a 100644 --- a/new-luxc/source/luxc/lang/translation/common-lisp/procedure/common.jvm.lux +++ b/new-luxc/source/luxc/lang/translation/common-lisp/procedure/common.jvm.lux @@ -220,15 +220,6 @@ [frac//max Double::MAX_VALUE _.double] ) -(do-template [<name> <expression>] - [(def: (<name> _) - Nullary - (_.int <expression>))] - - [int//min ("lux int min")] - [int//max ("lux int max")] - ) - (do-template [<name> <op>] [(def: (<name> [subjectO paramO]) Binary @@ -276,8 +267,6 @@ (install "%" (binary int//%)) (install "=" (binary int//=)) (install "<" (binary int//<)) - (install "min" (nullary int//min)) - (install "max" (nullary int//max)) (install "to-frac" (unary (|>> (_./ (_.double 1.0)))))))) (def: frac-procs diff --git a/new-luxc/source/luxc/lang/translation/js/procedure/common.jvm.lux b/new-luxc/source/luxc/lang/translation/js/procedure/common.jvm.lux index 05cd0137b..cdaa22eee 100644 --- a/new-luxc/source/luxc/lang/translation/js/procedure/common.jvm.lux +++ b/new-luxc/source/luxc/lang/translation/js/procedure/common.jvm.lux @@ -186,10 +186,6 @@ (format arrayJS ".length")) ## [[Numbers]] -(host.import: java/lang/Long - (#static MIN_VALUE Long) - (#static MAX_VALUE Long)) - (host.import: java/lang/Double (#static MIN_VALUE Double) (#static MAX_VALUE Double)) @@ -199,9 +195,6 @@ Nullary (<encode> <const>))] - [int//min Long::MIN_VALUE runtimeT.int] - [int//max Long::MAX_VALUE runtimeT.int] - [frac//smallest Double::MIN_VALUE runtimeT.frac] [frac//min (f/* -1.0 Double::MAX_VALUE) runtimeT.frac] [frac//max Double::MAX_VALUE runtimeT.frac] @@ -417,8 +410,6 @@ (install "%" (binary int//rem)) (install "=" (binary int//=)) (install "<" (binary int//<)) - (install "min" (nullary int//min)) - (install "max" (nullary int//max)) (install "to-frac" (unary int//to-frac)) (install "char" (unary int//char))))) diff --git a/new-luxc/source/luxc/lang/translation/jvm/procedure/common.jvm.lux b/new-luxc/source/luxc/lang/translation/jvm/procedure/common.jvm.lux index 06909b5d1..10b8cb75d 100644 --- a/new-luxc/source/luxc/lang/translation/jvm/procedure/common.jvm.lux +++ b/new-luxc/source/luxc/lang/translation/jvm/procedure/common.jvm.lux @@ -26,10 +26,6 @@ [".T" function] [".T" loop])) -(host.import: java/lang/Long - (#static MIN_VALUE Long) - (#static MAX_VALUE Long)) - (host.import: java/lang/Double (#static MIN_VALUE Double) (#static MAX_VALUE Double)) @@ -258,9 +254,6 @@ Nullary (|>> <const> ($i.wrap <type>)))] - [int//min ($i.long Long::MIN_VALUE) #$.Long] - [int//max ($i.long Long::MAX_VALUE) #$.Long] - [frac//smallest ($i.double Double::MIN_VALUE) #$.Double] [frac//min ($i.double (f/* -1.0 Double::MAX_VALUE)) #$.Double] [frac//max ($i.double Double::MAX_VALUE) #$.Double] @@ -560,8 +553,6 @@ (install "%" (binary int//rem)) (install "=" (binary int//eq)) (install "<" (binary int//lt)) - (install "min" (nullary int//min)) - (install "max" (nullary int//max)) (install "to-frac" (unary int//to-frac)) (install "char" (unary int//char))))) diff --git a/new-luxc/source/luxc/lang/translation/lua/procedure/common.jvm.lux b/new-luxc/source/luxc/lang/translation/lua/procedure/common.jvm.lux index 67aa5417a..7497aeca2 100644 --- a/new-luxc/source/luxc/lang/translation/lua/procedure/common.jvm.lux +++ b/new-luxc/source/luxc/lang/translation/lua/procedure/common.jvm.lux @@ -194,15 +194,6 @@ [frac//max Double::MAX_VALUE lua.float] ) -(do-template [<name> <expression>] - [(def: (<name> _) - Nullary - <expression>)] - - [int//min "math.mininteger"] - [int//max "math.maxinteger"] - ) - (do-template [<name> <op>] [(def: (<name> [subjectO paramO]) Binary @@ -407,8 +398,6 @@ (install "%" (binary int//rem)) (install "=" (binary int//=)) (install "<" (binary int//<)) - (install "min" (nullary int//min)) - (install "max" (nullary int//max)) (install "to-frac" (unary int//to-frac)) (install "char" (unary int//char))))) diff --git a/new-luxc/source/luxc/lang/translation/php/procedure/common.jvm.lux b/new-luxc/source/luxc/lang/translation/php/procedure/common.jvm.lux index 8f11d98a3..3f9825737 100644 --- a/new-luxc/source/luxc/lang/translation/php/procedure/common.jvm.lux +++ b/new-luxc/source/luxc/lang/translation/php/procedure/common.jvm.lux @@ -227,15 +227,6 @@ ## [frac//max Double::MAX_VALUE _.float] ## ) -(do-template [<name> <expression>] - [(def: (<name> _) - Nullary - <expression>)] - - [int//min (|> (_.int -2) (_.** (_.int 63)))] - [int//max (|> (_.int 2) (_.** (_.int 63)) (_.- (_.int 1)))] - ) - (do-template [<name> <op>] [(def: (<name> [subjectO paramO]) Binary @@ -286,8 +277,6 @@ (install "%" (binary int//%)) (install "=" (binary int//=)) (install "<" (binary int//<)) - (install "min" (nullary int//min)) - (install "max" (nullary int//max)) (install "to-frac" (unary _.floatval/1))))) ## (def: frac-procs diff --git a/new-luxc/source/luxc/lang/translation/python/procedure/common.jvm.lux b/new-luxc/source/luxc/lang/translation/python/procedure/common.jvm.lux index 7dbeb2ab5..ea3d25687 100644 --- a/new-luxc/source/luxc/lang/translation/python/procedure/common.jvm.lux +++ b/new-luxc/source/luxc/lang/translation/python/procedure/common.jvm.lux @@ -227,15 +227,6 @@ [frac//max Double::MAX_VALUE python.float] ) -(do-template [<name> <expression>] - [(def: (<name> _) - Nullary - <expression>)] - - [int//min (|> (python.int -2) (python.** (python.int 63)))] - [int//max (|> (python.int 2) (python.** (python.int 63)) (python.- (python.int 1)))] - ) - (do-template [<name> <op>] [(def: (<name> [subjectO paramO]) Binary @@ -305,8 +296,6 @@ (install "%" (binary int//rem)) (install "=" (binary int//=)) (install "<" (binary int//<)) - (install "min" (nullary int//min)) - (install "max" (nullary int//max)) (install "to-frac" (unary (apply1 (python.global "float")))) (install "char" (unary (apply1 (python.global "chr"))))))) diff --git a/new-luxc/source/luxc/lang/translation/r/procedure/common.jvm.lux b/new-luxc/source/luxc/lang/translation/r/procedure/common.jvm.lux index ea85aef1e..2e6ea90e2 100644 --- a/new-luxc/source/luxc/lang/translation/r/procedure/common.jvm.lux +++ b/new-luxc/source/luxc/lang/translation/r/procedure/common.jvm.lux @@ -218,15 +218,6 @@ [frac//max Double::MAX_VALUE r.float] ) -(do-template [<name> <expression>] - [(def: (<name> _) - Nullary - <expression>)] - - [int//min runtimeT.int//min] - [int//max runtimeT.int//max] - ) - (do-template [<name> <op>] [(def: (<name> [subjectO paramO]) Binary @@ -283,8 +274,6 @@ (install "%" (binary int//rem)) (install "=" (binary int//=)) (install "<" (binary int//<)) - (install "min" (nullary int//min)) - (install "max" (nullary int//max)) (install "to-frac" (unary runtimeT.int//to-float)) (install "char" (unary int//char))))) diff --git a/new-luxc/source/luxc/lang/translation/r/runtime.jvm.lux b/new-luxc/source/luxc/lang/translation/r/runtime.jvm.lux index 7267494d5..09bc9e7b0 100644 --- a/new-luxc/source/luxc/lang/translation/r/runtime.jvm.lux +++ b/new-luxc/source/luxc/lang/translation/r/runtime.jvm.lux @@ -3,7 +3,7 @@ (lux (control ["p" parser "p/" Monad<Parser>] [monad #+ do]) (data [bit] - [number #+ hex] + [number (#+ hex) ("int/" Interval<Int>)] text/format (coll [list "list/" Monad<List>])) [macro] @@ -169,8 +169,8 @@ [int//zero 0] [int//one 1] - [int//min ("lux int min")] - [int//max ("lux int max")] + [int//min int/bottom] + [int//max int/top] ) (def: #export int64-high (r.nth (r.string //.int-high-field))) diff --git a/new-luxc/source/luxc/lang/translation/ruby/procedure/common.jvm.lux b/new-luxc/source/luxc/lang/translation/ruby/procedure/common.jvm.lux index 7ea0df048..01ca1e8b4 100644 --- a/new-luxc/source/luxc/lang/translation/ruby/procedure/common.jvm.lux +++ b/new-luxc/source/luxc/lang/translation/ruby/procedure/common.jvm.lux @@ -228,15 +228,6 @@ [frac//max Double::MAX_VALUE ruby.float] ) -(do-template [<name> <expression>] - [(def: (<name> _) - Nullary - <expression>)] - - [int//min (|> (ruby.int -2) (ruby.pow (ruby.int 63)))] - [int//max (|> (ruby.int 2) (ruby.pow (ruby.int 63)) (ruby.- (ruby.int 1)))] - ) - (do-template [<name> <op>] [(def: (<name> [subjectO paramO]) Binary @@ -310,8 +301,6 @@ (install "%" (binary int//rem)) (install "=" (binary int//=)) (install "<" (binary int//<)) - (install "min" (nullary int//min)) - (install "max" (nullary int//max)) (install "to-frac" (unary (ruby./ (ruby.float 1.0)))) (install "char" (unary (ruby.send "chr" (list))))))) diff --git a/new-luxc/test/test/luxc/lang/translation/common.lux b/new-luxc/test/test/luxc/lang/translation/common.lux index d12a5f87d..f933abe8d 100644 --- a/new-luxc/test/test/luxc/lang/translation/common.lux +++ b/new-luxc/test/test/luxc/lang/translation/common.lux @@ -8,7 +8,7 @@ ["e" error] [bool "bool/" Eq<Bool>] [text "text/" Eq<Text>] - [number "int/" Number<Int> Interval<Int> "frac/" Number<Frac> Interval<Frac>] + [number "int/" Number<Int> "frac/" Number<Frac> Interval<Frac>] (coll ["a" array] [list])) ["r" math/random] @@ -67,19 +67,6 @@ #let [_ (log! (format " param = " (%i param) "\n" "subject = " (%i subject) "\n"))]] (`` ($_ seq - (~~ (do-template [<name> <reference>] - [(test <name> - (|> (run (` (<name>))) - (case> (#e.Success valueT) - (i/= <reference> (:coerce Int valueT)) - - (#e.Error error) - (exec (log! error) - false))))] - - ["lux int min" int/bottom] - ["lux int max" int/top] - )) (~~ (do-template [<name> <type> <prepare> <comp> <subject-expr>] [(test <name> (|> (run (` (<name> (~ (code.int subject))))) diff --git a/stdlib/source/lux/language/compiler/extension/analysis/common.lux b/stdlib/source/lux/language/compiler/extension/analysis/common.lux index fff844417..1a377ec14 100644 --- a/stdlib/source/lux/language/compiler/extension/analysis/common.lux +++ b/stdlib/source/lux/language/compiler/extension/analysis/common.lux @@ -173,9 +173,6 @@ (///bundle.install "%" (binary Int Int Int)) (///bundle.install "=" (binary Int Int Bool)) (///bundle.install "<" (binary Int Int Bool)) - (///bundle.install "min" (nullary Int)) - (///bundle.install "max" (nullary Int)) - (///bundle.install "to-nat" (unary Int Nat)) (///bundle.install "to-frac" (unary Int Frac)) (///bundle.install "char" (unary Int Text))))) diff --git a/stdlib/test/test/lux/language/compiler/analysis/procedure/common.lux b/stdlib/test/test/lux/language/compiler/analysis/procedure/common.lux index acb58e426..9b51084fe 100644 --- a/stdlib/test/test/lux/language/compiler/analysis/procedure/common.lux +++ b/stdlib/test/test/lux/language/compiler/analysis/procedure/common.lux @@ -101,13 +101,7 @@ (check-success+ "lux int =" (list subjectC paramC) Bool)) (test "Can compare integers." (check-success+ "lux int <" (list subjectC paramC) Bool)) - (test "Can obtain minimum integer." - (check-success+ "lux int min" (list) Int)) - (test "Can obtain maximum integer." - (check-success+ "lux int max" (list) Int)) - (test "Can convert integer to natural number." - (check-success+ "lux int to-nat" (list subjectC) Nat)) - (test "Can convert integer to frac number." + (test "Can convert integer to fraction." (check-success+ "lux int to-frac" (list subjectC) Frac)) (test "Can convert integer to text." (check-success+ "lux int char" (list subjectC) Text)) |