diff options
author | Eduardo Julian | 2018-07-22 02:52:46 -0400 |
---|---|---|
committer | Eduardo Julian | 2018-07-22 02:52:46 -0400 |
commit | b14102eaa2a80f51f160ba293ec01928dbe683c3 (patch) | |
tree | bf2640c4503de8c9f0a8f6b048548ef1a0bd4e83 /new-luxc/source/luxc/lang/translation/jvm/common.jvm.lux | |
parent | 9671d6064dd02dfe6c32492f5b9907b096e5bd89 (diff) |
- Some fixes due to recent changes in stdlib.
- Removed some (now) useless modules.
Diffstat (limited to '')
-rw-r--r-- | new-luxc/source/luxc/lang/translation/jvm/common.jvm.lux | 47 |
1 files changed, 24 insertions, 23 deletions
diff --git a/new-luxc/source/luxc/lang/translation/jvm/common.jvm.lux b/new-luxc/source/luxc/lang/translation/jvm/common.jvm.lux index b01a68c3d..a138bd79a 100644 --- a/new-luxc/source/luxc/lang/translation/jvm/common.jvm.lux +++ b/new-luxc/source/luxc/lang/translation/jvm/common.jvm.lux @@ -3,23 +3,24 @@ [control [monad (#+ do)] ["ex" exception (#+ exception:)]] - [io] + ["." io] [concurrency [atom (#+ Atom atom)]] [data - [error (#+ Error)] - [text ("text/" Hash<Text>) + ["." error (#+ Error)] + ["." text ("text/." Hash<Text>) format] [collection - [dictionary (#+ Dictionary)]]] - [macro] + ["." dictionary (#+ Dictionary)]]] + ["." macro] [host (#+ import:)] [world - [blob (#+ Blob)]] - [language - [name] - [reference (#+ Register)] - ["." compiler]]] + [binary (#+ Binary)]] + [compiler + [default + ["." name] + [reference (#+ Register)] + ["." phase]]]] ## [luxc ## [lang ## [host @@ -29,30 +30,30 @@ ## (def: #export (with-artifacts action) ## (All [a] (-> (Meta a) (Meta [Artifacts a]))) -## (function (_ compiler) +## (function (_ state) ## (case (action (update@ #.host ## (|>> (:coerce Host) ## (set@ #artifacts (dictionary.new text.Hash<Text>)) ## (:coerce Nothing)) -## compiler)) -## (#error.Success [compiler' output]) +## state)) +## (#error.Success [state' output]) ## (#error.Success [(update@ #.host ## (|>> (:coerce Host) -## (set@ #artifacts (|> (get@ #.host compiler) (:coerce Host) (get@ #artifacts))) +## (set@ #artifacts (|> (get@ #.host state) (:coerce Host) (get@ #artifacts))) ## (:coerce Nothing)) -## compiler') -## [(|> compiler' (get@ #.host) (:coerce Host) (get@ #artifacts)) +## state') +## [(|> state' (get@ #.host) (:coerce Host) (get@ #artifacts)) ## output]]) ## (#error.Error error) ## (#error.Error error)))) -## (def: #export (load-definition compiler) -## (-> Lux (-> Ident Blob (Error Any))) -## (function (_ (^@ def-ident [def-module def-name]) def-bytecode) +## (def: #export (load-definition state) +## (-> Lux (-> Name Binary (Error 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 compiler) +## (<| (macro.run state) ## (do macro.Monad<Meta> ## [_ (..store-class class-name def-bytecode) ## class (..load-class class-name)] @@ -63,10 +64,10 @@ ## (wrap def-value) ## (#error.Success #.None) -## (compiler.throw invalid-definition-value (%ident def-ident)) +## (phase.throw invalid-definition-value (%name def-name)) ## (#error.Error error) -## (compiler.throw cannot-load-definition -## (format "Definition: " (%ident def-ident) "\n" +## (phase.throw cannot-load-definition +## (format "Definition: " (%name def-name) "\n" ## "Error:\n" ## error)))))))) |