aboutsummaryrefslogtreecommitdiff
path: root/new-luxc/source/luxc/lang/translation/common-lisp.lux
diff options
context:
space:
mode:
authorEduardo Julian2018-07-03 18:40:16 -0400
committerEduardo Julian2018-07-03 18:40:16 -0400
commitd3f5e1f4baa667bc2eb72edd542cf5d8cd3924ce (patch)
tree2aa771401cce0d08276abc072b9d31e00a651f29 /new-luxc/source/luxc/lang/translation/common-lisp.lux
parentbfd2d6c203042dfddb0ce29db3696365fe213314 (diff)
- Re-named ":!" to ":coerce".
Diffstat (limited to 'new-luxc/source/luxc/lang/translation/common-lisp.lux')
-rw-r--r--new-luxc/source/luxc/lang/translation/common-lisp.lux34
1 files changed, 17 insertions, 17 deletions
diff --git a/new-luxc/source/luxc/lang/translation/common-lisp.lux b/new-luxc/source/luxc/lang/translation/common-lisp.lux
index 36926833c..4341e5e4c 100644
--- a/new-luxc/source/luxc/lang/translation/common-lisp.lux
+++ b/new-luxc/source/luxc/lang/translation/common-lisp.lux
@@ -83,26 +83,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]])
@@ -114,7 +114,7 @@
(function (_ compiler)
(#e.Success [compiler
(|> (get@ #.host compiler)
- (:! Host)
+ (:coerce Host)
(get@ #context)
(let> [name sub]
name))])))
@@ -122,15 +122,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])
@@ -140,7 +140,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])
@@ -150,7 +150,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)
@@ -160,13 +160,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 [<name> <field> <outputT>]
[(def: (<name> code)
(-> Expression (Meta <outputT>))
(function (_ compiler)
- (let [runner (|> compiler (get@ #.host) (:! Host) (get@ <field>))]
+ (let [runner (|> compiler (get@ #.host) (:coerce Host) (get@ <field>))]
(case (runner code)
(#e.Error error)
((lang.throw Cannot-Execute error) compiler)
@@ -190,7 +190,7 @@
(-> Expression (Meta Any))
(do macro.Monad<Meta>
[module-buffer module-buffer
- #let [_ (Appendable::append [(:! CharSequence (_.expression code))]
+ #let [_ (Appendable::append [(:coerce CharSequence (_.expression code))]
module-buffer)]]
(load! code)))
@@ -203,7 +203,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)