aboutsummaryrefslogtreecommitdiff
path: root/new-luxc/source/luxc/lang/translation/jvm/common.lux
diff options
context:
space:
mode:
authorEduardo Julian2020-05-30 15:19:28 -0400
committerEduardo Julian2020-05-30 15:19:28 -0400
commitb4d0eba7485caf0c6cf58de1193a9114fa273d8b (patch)
treef6f7fa2967bb5923347db1ed1d4c9b08e56bf8c6 /new-luxc/source/luxc/lang/translation/jvm/common.lux
parent6eaa3b57f3f1ea2ce13b942bdb4ef502fc1729bc (diff)
Split new-luxc into lux-jvm and lux-r.
Diffstat (limited to 'new-luxc/source/luxc/lang/translation/jvm/common.lux')
-rw-r--r--new-luxc/source/luxc/lang/translation/jvm/common.lux72
1 files changed, 0 insertions, 72 deletions
diff --git a/new-luxc/source/luxc/lang/translation/jvm/common.lux b/new-luxc/source/luxc/lang/translation/jvm/common.lux
deleted file mode 100644
index 6cd7f4f2f..000000000
--- a/new-luxc/source/luxc/lang/translation/jvm/common.lux
+++ /dev/null
@@ -1,72 +0,0 @@
-(.module:
- [lux #*
- ## [abstract
- ## [monad (#+ do)]]
- ## [control
- ## ["." try (#+ Try)]
- ## ["ex" exception (#+ exception:)]
- ## ["." io]]
- ## [data
- ## [binary (#+ Binary)]
- ## ["." text ("#/." hash)
- ## format]
- ## [collection
- ## ["." dictionary (#+ Dictionary)]]]
- ## ["." macro]
- ## [host (#+ import:)]
- ## [tool
- ## [compiler
- ## [reference (#+ Register)]
- ## ["." name]
- ## ["." phase]]]
- ]
- ## [luxc
- ## [lang
- ## [host
- ## ["." jvm
- ## [type]]]]]
- )
-
-## (def: #export (with-artifacts action)
-## (All [a] (-> (Meta a) (Meta [Artifacts a])))
-## (function (_ state)
-## (case (action (update@ #.host
-## (|>> (:coerce Host)
-## (set@ #artifacts (dictionary.new text.hash))
-## (:coerce Nothing))
-## state))
-## (#try.Success [state' output])
-## (#try.Success [(update@ #.host
-## (|>> (:coerce Host)
-## (set@ #artifacts (|> (get@ #.host state) (:coerce Host) (get@ #artifacts)))
-## (:coerce Nothing))
-## state')
-## [(|> state' (get@ #.host) (:coerce Host) (get@ #artifacts))
-## output]])
-
-## (#try.Failure error)
-## (#try.Failure error))))
-
-## (def: #export (load-definition state)
-## (-> Lux (-> Name Binary (Try Any)))
-## (function (_ (^@ def-name [def-module def-name]) def-bytecode)
-## (let [normal-name (format (name.normalize def-name) (%n (text/hash def-name)))
-## class-name (format (text.replace-all "/" "." def-module) "." normal-name)]
-## (<| (macro.run state)
-## (do macro.monad
-## [_ (..store-class class-name def-bytecode)
-## class (..load-class class-name)]
-## (case (do try.monad
-## [field (Class::getField [..value-field] class)]
-## (Field::get [#.None] field))
-## (#try.Success (#.Some def-value))
-## (wrap def-value)
-
-## (#try.Success #.None)
-## (phase.throw invalid-definition-value (%name def-name))
-
-## (#try.Failure error)
-## (phase.throw cannot-load-definition
-## (format "Definition: " (%name def-name) "\n"
-## "Error:\n"
-## error))))))))