aboutsummaryrefslogtreecommitdiff
path: root/stdlib/source/lux/host/python.lux
diff options
context:
space:
mode:
Diffstat (limited to 'stdlib/source/lux/host/python.lux')
-rw-r--r--stdlib/source/lux/host/python.lux28
1 files changed, 14 insertions, 14 deletions
diff --git a/stdlib/source/lux/host/python.lux b/stdlib/source/lux/host/python.lux
index 134e35798..322ac261e 100644
--- a/stdlib/source/lux/host/python.lux
+++ b/stdlib/source/lux/host/python.lux
@@ -36,7 +36,7 @@
(-> (Code Any) Text)
(|>> :representation))
- (do-template [<type> <super>]
+ (template [<type> <super>]
[(with-expansions [<brand> (template.identifier [<type> "'"])]
(`` (abstract: #export (<brand> brand) {} Any))
(`` (type: #export (<type> brand)
@@ -49,7 +49,7 @@
[Statement Code]
)
- (do-template [<type> <super>]
+ (template [<type> <super>]
[(with-expansions [<brand> (template.identifier [<type> "'"])]
(`` (abstract: #export <brand> {} Any))
(`` (type: #export <type> (<super> <brand>))))]
@@ -72,7 +72,7 @@
(-> Text SVar)
(|>> :abstraction))
- (do-template [<name> <brand> <prefix>]
+ (template [<name> <brand> <prefix>]
[(def: #export <name>
(-> SVar (Var <brand>))
(|>> :representation (format <prefix>) :abstraction))]
@@ -101,7 +101,7 @@
(def: #export float
(-> Frac Literal)
- (`` (|>> (cond> (~~ (do-template [<lux> <python>]
+ (`` (|>> (cond> (~~ (template [<lux> <python>]
[[(f/= <lux>)]
[(new> (format "float(" text.double-quote <python> text.double-quote ")") [])]]
@@ -116,7 +116,7 @@
(def: sanitize
(-> Text Text)
- (`` (|>> (~~ (do-template [<find> <replace>]
+ (`` (|>> (~~ (template [<find> <replace>]
[(text.replace-all <find> <replace>)]
["\" "\\"]
@@ -150,7 +150,7 @@
(text.join-with ", "))
right-delimiter))))
- (do-template [<name> <pre> <post>]
+ (template [<name> <pre> <post>]
[(def: #export <name>
(-> (List (Expression Any)) Literal)
(composite-literal <pre> <post> ..code))]
@@ -181,7 +181,7 @@
..expression
(format (:representation func) "(" (text.join-with ", " (list@map ..code args)) ")")))
- (do-template [<name> <brand> <prefix>]
+ (template [<name> <brand> <prefix>]
[(def: (<name> var)
(-> (Expression Any) Text)
(format <prefix> (:representation var)))]
@@ -190,7 +190,7 @@
[splat-keyword Keyword "**"]
)
- (do-template [<name> <splat>]
+ (template [<name> <splat>]
[(def: #export (<name> args extra func)
(-> (List (Expression Any)) (Expression Any) (Expression Any) (Computation Any))
(<| :abstraction
@@ -213,7 +213,7 @@
(-> Text (List (Expression Any)) (Expression Any) (Computation Any))
(..apply/* (..the method object) args))
- (do-template [<name> <apply>]
+ (template [<name> <apply>]
[(def: #export (<name> args extra method)
(-> (List (Expression Any)) (Expression Any) Text
(-> (Expression Any) (Computation Any)))
@@ -233,7 +233,7 @@
..expression
(format (:representation then) " if " (:representation test) " else " (:representation else))))
- (do-template [<name> <op>]
+ (template [<name> <op>]
[(def: #export (<name> param subject)
(-> (Expression Any) (Expression Any) (Computation Any))
(<| :abstraction
@@ -307,7 +307,7 @@
text.new-line
(:representation post!))))
- (do-template [<keyword> <0>]
+ (template [<keyword> <0>]
[(def: #export <0>
Statement
(:abstraction <keyword>))]
@@ -354,7 +354,7 @@
(..nest (:representation catch!)))))
(text.join-with "")))))
- (do-template [<name> <keyword>]
+ (template [<name> <keyword>]
[(def: #export (<name> message)
(-> (Expression Any) (Statement Any))
(:abstraction
@@ -399,7 +399,7 @@
(syntax: (arity-types {arity s.nat})
(wrap (list.repeat arity (` (Expression Any)))))
-(do-template [<arity> <function>+]
+(template [<arity> <function>+]
[(with-expansions [<apply> (template.identifier ["apply/" <arity>])
<inputs> (arity-inputs <arity>)
<types> (arity-types <arity>)
@@ -408,7 +408,7 @@
(-> (Expression Any) <types> (Computation Any))
(..apply/* function (.list <inputs>)))
- (do-template [<function>]
+ (template [<function>]
[(`` (def: #export (~~ (template.identifier [<function> "/" <arity>]))
(<apply> (..var <function>))))]