diff options
Diffstat (limited to '')
8 files changed, 38 insertions, 38 deletions
diff --git a/new-luxc/source/luxc/lang/translation/r.lux b/new-luxc/source/luxc/lang/translation/r.lux index 410e167bc..0eba35760 100644 --- a/new-luxc/source/luxc/lang/translation/r.lux +++ b/new-luxc/source/luxc/lang/translation/r.lux @@ -56,7 +56,7 @@ (type: #export Host {#context [Text Nat] #anchor (Maybe Anchor) - #loader (-> Expression (Error Top)) + #loader (-> Expression (Error Any)) #interpreter (-> Expression (Error Object)) #module-buffer (Maybe StringBuilder) #program-buffer StringBuilder}) @@ -82,12 +82,12 @@ (def: #export r-module-name Text "module.r") (def: #export init-module-buffer - (Meta Top) + (Meta Any) (function (_ compiler) (#e.Success [(update@ #.host (|>> (:! Host) (set@ #module-buffer (#.Some (StringBuilder::new []))) - (:! Bottom)) + (:! Nothing)) compiler) []]))) @@ -98,13 +98,13 @@ [old-name old-sub] (get@ #context old) new-name (format old-name "f___" (%i (nat-to-int old-sub)))] (case (expr (set@ #.host - (:! Bottom (set@ #context [new-name +0] old)) + (:! Nothing (set@ #context [new-name +0] old)) compiler)) (#e.Success [compiler' output]) (#e.Success [(update@ #.host (|>> (:! Host) (set@ #context [old-name (n/inc old-sub)]) - (:! Bottom)) + (:! Nothing)) compiler') [new-name output]]) @@ -126,13 +126,13 @@ (function (_ compiler) (let [old (:! Host (get@ #.host compiler))] (case (expr (set@ #.host - (:! Bottom (set@ #anchor (#.Some anchor) old)) + (:! Nothing (set@ #anchor (#.Some anchor) old)) compiler)) (#e.Success [compiler' output]) (#e.Success [(update@ #.host (|>> (:! Host) (set@ #anchor (get@ #anchor old)) - (:! Bottom)) + (:! Nothing)) compiler') output]) @@ -176,7 +176,7 @@ (#e.Success output) (#e.Success [compiler output])))))] - [load! #loader Top] + [load! #loader Any] [interpret #interpreter Object] ) @@ -194,7 +194,7 @@ (lang.normalize-name (format module "$" name))) (def: #export (save code) - (-> Expression (Meta Top)) + (-> Expression (Meta Any)) (do macro.Monad<Meta> [module-buffer module-buffer #let [_ (Appendable::append [(:! CharSequence (r.expression code))] @@ -204,7 +204,7 @@ (def: #export run interpret) (def: #export (save-module! target) - (-> File (Meta (Process Top))) + (-> File (Meta (Process Any))) (do macro.Monad<Meta> [module macro.current-module-name module-buffer module-buffer diff --git a/new-luxc/source/luxc/lang/translation/r/eval.jvm.lux b/new-luxc/source/luxc/lang/translation/r/eval.jvm.lux index 05d16f871..66e157e40 100644 --- a/new-luxc/source/luxc/lang/translation/r/eval.jvm.lux +++ b/new-luxc/source/luxc/lang/translation/r/eval.jvm.lux @@ -50,10 +50,10 @@ (host.import org/renjin/sexp/Null) (def: (parse-tuple lux-object host-object) - (-> (-> Object (Error Top)) ListVector (Error Top)) + (-> (-> Object (Error Any)) ListVector (Error Any)) (let [size (:! Nat (ListVector::length [] host-object))] (loop [idx +0 - output (:! (Array Top) (array.new size))] + output (:! (Array Any) (array.new size))] (if (n/< size idx) (case (ListVector::getElementAsSEXP [(:! Int idx)] host-object) (#e.Error error) @@ -65,11 +65,11 @@ (#e.Error error) (#e.Success lux-value) - (recur (n/inc idx) (array.write idx (:! Top lux-value) output)))) + (recur (n/inc idx) (array.write idx (:! Any lux-value) output)))) (#e.Success output))))) (def: (parse-variant lux-object host-object) - (-> (-> Object (Error Top)) ListVector (Error Top)) + (-> (-> Object (Error Any)) ListVector (Error Any)) (do e.Monad<Error> [tag (ListVector::get-field-sexp [//.variant-tag-field] host-object) flag (ListVector::get-field-sexp [//.variant-flag-field] host-object) @@ -79,7 +79,7 @@ (:! IntArrayVector) (IntArrayVector::getElementAsInt [0]) (Long::intValue [])) - (: Top + (: Any (if (host.instance? Null flag) (host.null) //.unit)) @@ -100,7 +100,7 @@ low)))))) (def: (lux-object host-object) - (-> Object (Error Top)) + (-> Object (Error Any)) (cond (host.instance? StringArrayVector host-object) (#e.Success (StringArrayVector::getElementAsString [0] (:! StringArrayVector host-object))) @@ -132,7 +132,7 @@ (ex.throw Unknown-Kind-Of-Host-Object (format object-class " --- " text-representation))))) (def: #export (eval code) - (-> Expression (Meta Top)) + (-> Expression (Meta Any)) (function (_ compiler) (let [interpreter (|> compiler (get@ #.host) (:! //.Host) (get@ #//.interpreter))] (case (interpreter code) 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 f13329e26..7cdc82064 100644 --- a/new-luxc/source/luxc/lang/translation/r/runtime.jvm.lux +++ b/new-luxc/source/luxc/lang/translation/r/runtime.jvm.lux @@ -882,7 +882,7 @@ (def: #export artifact Text (format prefix ".r")) (def: #export translate - (Meta (Process Top)) + (Meta (Process Any)) (do macro.Monad<Meta> [_ //.init-module-buffer _ (//.save runtime)] diff --git a/new-luxc/source/luxc/lang/translation/r/statement.jvm.lux b/new-luxc/source/luxc/lang/translation/r/statement.jvm.lux index 7ff6a23e8..62349abcf 100644 --- a/new-luxc/source/luxc/lang/translation/r/statement.jvm.lux +++ b/new-luxc/source/luxc/lang/translation/r/statement.jvm.lux @@ -11,7 +11,7 @@ [".T" eval])) (def: #export (translate-def name expressionT expressionO metaV) - (-> Text Type Expression Code (Meta Top)) + (-> Text Type Expression Code (Meta Any)) (do macro.Monad<Meta> [current-module macro.current-module-name #let [def-ident [current-module name]]] diff --git a/new-luxc/source/luxc/lang/translation/ruby.lux b/new-luxc/source/luxc/lang/translation/ruby.lux index 16b0813d5..c8cce4caf 100644 --- a/new-luxc/source/luxc/lang/translation/ruby.lux +++ b/new-luxc/source/luxc/lang/translation/ruby.lux @@ -51,7 +51,7 @@ (type: #export Host {#context [Text Nat] #anchor (Maybe Anchor) - #interpreter (-> Text (Error Top)) + #interpreter (-> Text (Error Any)) #module-buffer (Maybe StringBuilder) #program-buffer StringBuilder}) @@ -61,19 +61,19 @@ #anchor #.None #interpreter (let [interpreter (ScriptingContainer::new [])] (function (_ code) - ("lux try" (io (: Top (maybe.default [] (ScriptingContainer::runScriptlet [code] interpreter))))))) + ("lux try" (io (: Any (maybe.default [] (ScriptingContainer::runScriptlet [code] interpreter))))))) #module-buffer #.None #program-buffer (StringBuilder::new [])})) (def: #export ruby-module-name Text "module.rb") (def: #export init-module-buffer - (Meta Top) + (Meta Any) (function (_ compiler) (#e.Success [(update@ #.host (|>> (:! Host) (set@ #module-buffer (#.Some (StringBuilder::new []))) - (:! Bottom)) + (:! Nothing)) compiler) []]))) @@ -84,13 +84,13 @@ [old-name old-sub] (get@ #context old) new-name (format old-name "___" (%i (nat-to-int old-sub)))] (case (expr (set@ #.host - (:! Bottom (set@ #context [new-name +0] old)) + (:! Nothing (set@ #context [new-name +0] old)) compiler)) (#e.Success [compiler' output]) (#e.Success [(update@ #.host (|>> (:! Host) (set@ #context [old-name (n/inc old-sub)]) - (:! Bottom)) + (:! Nothing)) compiler') [new-name output]]) @@ -112,13 +112,13 @@ (function (_ compiler) (let [old (:! Host (get@ #.host compiler))] (case (expr (set@ #.host - (:! Bottom (set@ #anchor (#.Some anchor) old)) + (:! Nothing (set@ #anchor (#.Some anchor) old)) compiler)) (#e.Success [compiler' output]) (#e.Success [(update@ #.host (|>> (:! Host) (set@ #anchor (get@ #anchor old)) - (:! Bottom)) + (:! Nothing)) compiler') output]) @@ -151,7 +151,7 @@ (#e.Success [compiler (|> compiler (get@ #.host) (:! Host) (get@ #program-buffer))]))) (def: (execute code) - (-> Expression (Meta Top)) + (-> Expression (Meta Any)) (function (_ compiler) (let [interpreter (|> compiler (get@ #.host) (:! Host) (get@ #interpreter))] (case (interpreter code) @@ -172,7 +172,7 @@ (lang.normalize-name (format module "$" name))) (def: #export (save code) - (-> Ruby (Meta Top)) + (-> Ruby (Meta Any)) (do macro.Monad<Meta> [module-buffer module-buffer #let [_ (Appendable::append [(:! CharSequence code)] @@ -180,7 +180,7 @@ (execute code))) (def: #export (save-module! target) - (-> File (Meta (Process Top))) + (-> File (Meta (Process Any))) (do macro.Monad<Meta> [module macro.current-module-name module-buffer module-buffer diff --git a/new-luxc/source/luxc/lang/translation/ruby/eval.jvm.lux b/new-luxc/source/luxc/lang/translation/ruby/eval.jvm.lux index 348e5bcf9..49bf7f1da 100644 --- a/new-luxc/source/luxc/lang/translation/ruby/eval.jvm.lux +++ b/new-luxc/source/luxc/lang/translation/ruby/eval.jvm.lux @@ -36,10 +36,10 @@ (get [Object] #? Object)) (def: (tuple lux-object host-object) - (-> (-> Object (Error Top)) RubyArray (Error Top)) + (-> (-> Object (Error Any)) RubyArray (Error Any)) (let [size (:! Nat (RubyArray::getLength [] host-object))] (loop [idx +0 - output (:! (Array Top) (array.new size))] + output (:! (Array Any) (array.new size))] (if (n/< size idx) (case (RubyArray::get [(:! Int idx)] host-object) #.None @@ -55,7 +55,7 @@ (#e.Success output))))) (def: (variant lux-object host-object) - (-> (-> Object (Error Top)) RubyHash (Error Top)) + (-> (-> Object (Error Any)) RubyHash (Error Any)) (case [(RubyHash::get [(:! Object //.variant-tag-field)] host-object) (RubyHash::get [(:! Object //.variant-flag-field)] host-object) (RubyHash::get [(:! Object //.variant-value-field)] host-object)] @@ -63,14 +63,14 @@ [(lux-object value) (#.Some value)]) (#e.Success [(Long::intValue [] (:! Long tag)) - (: Top (case ?flag (#.Some _) "" #.None (host.null))) + (: Any (case ?flag (#.Some _) "" #.None (host.null))) value]) _ (ex.throw Not-A-Variant ""))) (def: (lux-object host-object) - (-> Object (Error Top)) + (-> Object (Error Any)) (`` (cond (host.null? host-object) (ex.throw Null-Has-No-Lux-Representation "") @@ -100,7 +100,7 @@ ))) (def: #export (eval code) - (-> Expression (Meta Top)) + (-> Expression (Meta Any)) (function (_ compiler) (let [interpreter (|> compiler (get@ #.host) (:! //.Host) (get@ #//.interpreter))] (case (interpreter code) diff --git a/new-luxc/source/luxc/lang/translation/ruby/runtime.jvm.lux b/new-luxc/source/luxc/lang/translation/ruby/runtime.jvm.lux index e2bf83dfa..bb0549259 100644 --- a/new-luxc/source/luxc/lang/translation/ruby/runtime.jvm.lux +++ b/new-luxc/source/luxc/lang/translation/ruby/runtime.jvm.lux @@ -271,7 +271,7 @@ (def: #export artifact Text (format prefix ".rb")) (def: #export translate - (Meta (Process Top)) + (Meta (Process Any)) (do macro.Monad<Meta> [_ //.init-module-buffer _ (//.save runtime)] diff --git a/new-luxc/source/luxc/lang/translation/ruby/statement.jvm.lux b/new-luxc/source/luxc/lang/translation/ruby/statement.jvm.lux index 972a6428e..135a09039 100644 --- a/new-luxc/source/luxc/lang/translation/ruby/statement.jvm.lux +++ b/new-luxc/source/luxc/lang/translation/ruby/statement.jvm.lux @@ -11,7 +11,7 @@ [".T" eval])) (def: #export (translate-def name expressionT expressionO metaV) - (-> Text Type Expression Code (Meta Top)) + (-> Text Type Expression Code (Meta Any)) (do macro.Monad<Meta> [current-module macro.current-module-name #let [def-ident [current-module name]]] |