diff options
author | Eduardo Julian | 2018-05-20 21:04:03 -0400 |
---|---|---|
committer | Eduardo Julian | 2018-05-20 21:04:03 -0400 |
commit | 14e96f5e5dad439383d63e60a52169cc2e7aaa5c (patch) | |
tree | 606398bbf6742a476a2599d9b25c184c71eae5c7 /new-luxc/source/luxc/lang/translation/scheme | |
parent | 19d38211c33faf6d5fe01665982d696643f60051 (diff) |
- Re-named "Top" to "Any", and "Bottom" to "Nothing".
- Removed some modules that should have been deleted before.
Diffstat (limited to '')
4 files changed, 21 insertions, 21 deletions
diff --git a/new-luxc/source/luxc/lang/translation/scheme.lux b/new-luxc/source/luxc/lang/translation/scheme.lux index 451d5f8e2..22cd7151e 100644 --- a/new-luxc/source/luxc/lang/translation/scheme.lux +++ b/new-luxc/source/luxc/lang/translation/scheme.lux @@ -55,7 +55,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 (format "module" file-extension)) (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] ) @@ -189,7 +189,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 (scheme.expression code))] @@ -199,7 +199,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/scheme/eval.jvm.lux b/new-luxc/source/luxc/lang/translation/scheme/eval.jvm.lux index a45af1f00..056bf7599 100644 --- a/new-luxc/source/luxc/lang/translation/scheme/eval.jvm.lux +++ b/new-luxc/source/luxc/lang/translation/scheme/eval.jvm.lux @@ -59,36 +59,36 @@ (host.import gnu/mapping/SimpleSymbol) (def: (parse-tuple lux-object host-object) - (-> (-> Object (Error Top)) (FVector Object) (Error Top)) + (-> (-> Object (Error Any)) (FVector Object) (Error Any)) (let [size (:! Nat (FVector::getBufferLength [] host-object))] (loop [idx +0 - output (:! (Array Top) (array.new size))] + output (:! (Array Any) (array.new size))] (if (n/< size idx) (case (lux-object (FVector::get [(:! Int idx)] host-object)) (#e.Error error) (#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: (variant tag flag value) - (-> Nat Bool Top Top) + (-> Nat Bool Any Any) [(Long::intValue [] (:! Long tag)) - (: Top + (: Any (if flag //.unit (host.null))) value]) (def: (to-text value) - (-> Top Text) + (-> Any Text) (let [value-text (:! Text (Object::toString [] (:! Object value))) class-text (:! Text (Object::toString [] (Object::getClass [] (:! Object value))))] (format value-text " : " class-text))) (def: (parse-variant lux-object host-object) - (-> (-> Object (Error Top)) Pair (Error Top)) + (-> (-> Object (Error Any)) Pair (Error Any)) (let [variant-tag (Pair::getCar [] host-object)] (if (and (host.instance? gnu/mapping/SimpleSymbol variant-tag) (text/= //.variant-tag (Symbol::getName [] (:! Symbol variant-tag)))) @@ -103,7 +103,7 @@ (ex.throw invalid-variant (:! Text (Object::toString [] (:! Object host-object))))))) (def: (lux-object host-object) - (-> Object (Error Top)) + (-> Object (Error Any)) (cond (or (host.instance? java/lang/Boolean host-object) (host.instance? java/lang/String host-object)) (#e.Success 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/scheme/runtime.jvm.lux b/new-luxc/source/luxc/lang/translation/scheme/runtime.jvm.lux index 3bdfc614f..c3f149eeb 100644 --- a/new-luxc/source/luxc/lang/translation/scheme/runtime.jvm.lux +++ b/new-luxc/source/luxc/lang/translation/scheme/runtime.jvm.lux @@ -368,7 +368,7 @@ (def: #export artifact Text (format prefix //.file-extension)) (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/scheme/statement.jvm.lux b/new-luxc/source/luxc/lang/translation/scheme/statement.jvm.lux index 6fdb4073a..43e18cb85 100644 --- a/new-luxc/source/luxc/lang/translation/scheme/statement.jvm.lux +++ b/new-luxc/source/luxc/lang/translation/scheme/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]]] |