aboutsummaryrefslogtreecommitdiff
path: root/lux-python/source
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--lux-python/source/program.lux80
1 files changed, 40 insertions, 40 deletions
diff --git a/lux-python/source/program.lux b/lux-python/source/program.lux
index 4aa41e066..3f720cdf5 100644
--- a/lux-python/source/program.lux
+++ b/lux-python/source/program.lux
@@ -128,17 +128,17 @@
(array.empty size))]
(if (n.< size idx)
(case (org/python/core/PyObject::__getitem__ (.int idx) host_object)
- {#try.Failure try}
- {#try.Failure try}
+ {try.#Failure try}
+ {try.#Failure try}
- {#try.Success value}
+ {try.#Success value}
(case (read value)
- {#try.Failure try}
- {#try.Failure try}
+ {try.#Failure try}
+ {try.#Failure try}
- {#try.Success lux_value}
+ {try.#Success lux_value}
(recur (++ idx) (array.write! idx lux_value output))))
- {#try.Success output}))))
+ {try.#Success output}))))
(exception: (unknown_kind_of_object [object java/lang/Object])
(exception.report
@@ -149,24 +149,24 @@
(case [(org/python/core/PyObject::__getitem__ +0 host_object)
(org/python/core/PyObject::__getitem__ +1 host_object)
(org/python/core/PyObject::__getitem__ +2 host_object)]
- (^or [{#try.Failure try} _ _]
- [_ {#try.Failure try} _]
- [_ _ {#try.Failure try}])
- {#try.Failure try}
+ (^or [{try.#Failure try} _ _]
+ [_ {try.#Failure try} _]
+ [_ _ {try.#Failure try}])
+ {try.#Failure try}
- (^multi [{#try.Success tag} {#try.Success flag} {#try.Success value}]
+ (^multi [{try.#Success tag} {try.#Success flag} {try.#Success value}]
[(read tag)
- {#try.Success tag}]
+ {try.#Success tag}]
[(read value)
- {#try.Success value}])
- {#try.Success [tag
+ {try.#Success value}])
+ {try.#Success [tag
(: Any
(case (ffi.check org/python/core/PyNone
(:as java/lang/Object flag))
- {#.Some _}
+ {.#Some _}
(:as Any (ffi.null))
- #.None
+ {.#None}
(:as Any synthesis.unit)))
value]}
@@ -177,8 +177,8 @@
Translator
(`` (<| (~~ (template [<class> <processing>]
[(case (ffi.check <class> (:as <class> host_object))
- {#.Some host_object}
- {#try.Success (`` (|> host_object (~~ (template.spliced <processing>))))}
+ {.#Some host_object}
+ {try.#Success (`` (|> host_object (~~ (template.spliced <processing>))))}
_)]
@@ -198,7 +198,7 @@
))
(~~ (template [<class> <processing>]
[(case (ffi.check <class> host_object)
- {#.Some host_object}
+ {.#Some host_object}
(<| <processing> (:as org/python/core/PyObject) host_object)
_)]
@@ -207,7 +207,7 @@
[org/python/core/PyList (..read_tuple read)]
))
... (exception.except ..unknown_kind_of_object [(:as java/lang/Object host_object)])
- {#try.Success host_object})))
+ {try.#Success host_object})))
(exception: (cannot_apply_a_non_function [object java/lang/Object])
(exception.report
@@ -249,18 +249,18 @@
(def: (expander macro inputs lux)
Expander
(case (ensure_macro macro)
- {#.Some macro}
+ {.#Some macro}
(case (..call_macro inputs lux macro)
- {#try.Success output}
+ {try.#Success output}
(|> output
(:as org/python/core/PyObject)
..read
(:as (Try (Try [Lux (List Code)]))))
- {#try.Failure error}
- {#try.Failure error})
+ {try.#Failure error}
+ {try.#Failure error})
- #.None
+ {.#None}
(exception.except ..cannot_apply_a_non_function (:as java/lang/Object macro)))))]
(for [@.old (as_is <jvm>)
@.jvm (as_is <jvm>)
@@ -268,7 +268,7 @@
@.python
(def: (expander macro inputs lux)
Expander
- {#try.Success ((:as Macro' macro) inputs lux)})]))
+ {try.#Success ((:as Macro' macro) inputs lux)})]))
(with_expansions [<jvm> (def: host
(IO (Host (_.Expression Any) (_.Statement Any)))
@@ -281,10 +281,10 @@
execute! (: (-> (_.Statement Any) (Try Any))
(function (execute! input)
(case (org/python/util/PythonInterpreter::exec (_.code input) interpreter)
- {#try.Failure error}
+ {try.#Failure error}
(if (text.contains? "maximum recursion depth exceeded" error)
(execute! input)
- {#try.Failure error})
+ {try.#Failure error})
output
output)))]
@@ -376,7 +376,7 @@
keywords [java/lang/String]])
org/python/core/PyObject
(try.trusted
- (case (array.list #.None inputs)
+ (case (array.list {.#None} inputs)
(^ (list))
(\ try.monad in (host_phase (list) phase))
@@ -477,12 +477,12 @@
(IO (Platform Register (_.Expression Any) (_.Statement Any)))
(do io.monad
[host ..host]
- (in [#platform.&file_system (file.async file.default)
- #platform.host host
- #platform.phase python.generate
- #platform.runtime runtime.generate
- #platform.phase_wrapper ..phase_wrapper
- #platform.write (|>> _.code (\ utf8.codec encoded))])))
+ (in [platform.#&file_system (file.async file.default)
+ platform.#host host
+ platform.#phase python.generate
+ platform.#runtime runtime.generate
+ platform.#phase_wrapper ..phase_wrapper
+ platform.#write (|>> _.code (\ utf8.codec encoded))])))
(def: (program context program)
(Program (_.Expression Any) (_.Statement Any))
@@ -518,10 +518,10 @@
(let [extension ".py"]
(exec
(do async.monad
- [_ (/.compiler [#/static.host @.python
- #/static.host_module_extension extension
- #/static.target (/cli.target service)
- #/static.artifact_extension extension]
+ [_ (/.compiler [/static.#host @.python
+ /static.#host_module_extension extension
+ /static.#target (/cli.target service)
+ /static.#artifact_extension extension]
..expander
analysis.bundle
..platform