From d3f5e1f4baa667bc2eb72edd542cf5d8cd3924ce Mon Sep 17 00:00:00 2001 From: Eduardo Julian Date: Tue, 3 Jul 2018 18:40:16 -0400 Subject: - Re-named ":!" to ":coerce". --- new-luxc/source/luxc/lang/translation/r.lux | 36 ++++++++++++++--------------- 1 file changed, 18 insertions(+), 18 deletions(-) (limited to 'new-luxc/source/luxc/lang/translation/r.lux') diff --git a/new-luxc/source/luxc/lang/translation/r.lux b/new-luxc/source/luxc/lang/translation/r.lux index 4864cc286..e9c984636 100644 --- a/new-luxc/source/luxc/lang/translation/r.lux +++ b/new-luxc/source/luxc/lang/translation/r.lux @@ -74,7 +74,7 @@ #interpreter (function (_ code) (do e.Monad [output (ScriptEngine::eval [(r.expression code)] interpreter)] - (wrap (maybe.default (:! Object []) + (wrap (maybe.default (:coerce Object []) output)))) #module-buffer #.None #program-buffer (StringBuilder::new [])}))) @@ -85,26 +85,26 @@ (Meta Any) (function (_ compiler) (#e.Success [(update@ #.host - (|>> (:! Host) + (|>> (:coerce Host) (set@ #module-buffer (#.Some (StringBuilder::new []))) - (:! Nothing)) + (:coerce Nothing)) compiler) []]))) (def: #export (with-sub-context expr) (All [a] (-> (Meta a) (Meta [Text a]))) (function (_ compiler) - (let [old (:! Host (get@ #.host compiler)) + (let [old (:coerce Host (get@ #.host compiler)) [old-name old-sub] (get@ #context old) new-name (format old-name "f___" (%i (.int old-sub)))] (case (expr (set@ #.host - (:! Nothing (set@ #context [new-name +0] old)) + (:coerce Nothing (set@ #context [new-name +0] old)) compiler)) (#e.Success [compiler' output]) (#e.Success [(update@ #.host - (|>> (:! Host) + (|>> (:coerce Host) (set@ #context [old-name (inc old-sub)]) - (:! Nothing)) + (:coerce Nothing)) compiler') [new-name output]]) @@ -116,7 +116,7 @@ (function (_ compiler) (#e.Success [compiler (|> (get@ #.host compiler) - (:! Host) + (:coerce Host) (get@ #context) (let> [name sub] name))]))) @@ -124,15 +124,15 @@ (def: #export (with-anchor anchor expr) (All [a] (-> Anchor (Meta a) (Meta a))) (function (_ compiler) - (let [old (:! Host (get@ #.host compiler))] + (let [old (:coerce Host (get@ #.host compiler))] (case (expr (set@ #.host - (:! Nothing (set@ #anchor (#.Some anchor) old)) + (:coerce Nothing (set@ #anchor (#.Some anchor) old)) compiler)) (#e.Success [compiler' output]) (#e.Success [(update@ #.host - (|>> (:! Host) + (|>> (:coerce Host) (set@ #anchor (get@ #anchor old)) - (:! Nothing)) + (:coerce Nothing)) compiler') output]) @@ -142,7 +142,7 @@ (def: #export anchor (Meta Anchor) (function (_ compiler) - (case (|> compiler (get@ #.host) (:! Host) (get@ #anchor)) + (case (|> compiler (get@ #.host) (:coerce Host) (get@ #anchor)) (#.Some anchor) (#e.Success [compiler anchor]) @@ -152,7 +152,7 @@ (def: #export module-buffer (Meta StringBuilder) (function (_ compiler) - (case (|> compiler (get@ #.host) (:! Host) (get@ #module-buffer)) + (case (|> compiler (get@ #.host) (:coerce Host) (get@ #module-buffer)) #.None ((lang.throw No-Active-Module-Buffer "") compiler) @@ -162,13 +162,13 @@ (def: #export program-buffer (Meta StringBuilder) (function (_ compiler) - (#e.Success [compiler (|> compiler (get@ #.host) (:! Host) (get@ #program-buffer))]))) + (#e.Success [compiler (|> compiler (get@ #.host) (:coerce Host) (get@ #program-buffer))]))) (do-template [ ] [(def: ( code) (-> Expression (Meta )) (function (_ compiler) - (let [runner (|> compiler (get@ #.host) (:! Host) (get@ ))] + (let [runner (|> compiler (get@ #.host) (:coerce Host) (get@ ))] (case (runner code) (#e.Error error) ((lang.throw Cannot-Execute error) compiler) @@ -197,7 +197,7 @@ (-> Expression (Meta Any)) (do macro.Monad [module-buffer module-buffer - #let [_ (Appendable::append [(:! CharSequence (r.expression code))] + #let [_ (Appendable::append [(:coerce CharSequence (r.expression code))] module-buffer)]] (load! code))) @@ -210,7 +210,7 @@ module-buffer module-buffer program-buffer program-buffer #let [module-code (StringBuilder::toString [] module-buffer) - _ (Appendable::append [(:! CharSequence (format module-code "\n"))] + _ (Appendable::append [(:coerce CharSequence (format module-code "\n"))] program-buffer)]] (wrap (ioC.write target (format (lang.normalize-name module) "/" r-module-name) -- cgit v1.2.3