diff options
Diffstat (limited to '')
-rw-r--r-- | new-luxc/source/luxc/lang/translation/jvm.lux | 41 |
1 files changed, 22 insertions, 19 deletions
diff --git a/new-luxc/source/luxc/lang/translation/jvm.lux b/new-luxc/source/luxc/lang/translation/jvm.lux index 61c86ae10..b2822726c 100644 --- a/new-luxc/source/luxc/lang/translation/jvm.lux +++ b/new-luxc/source/luxc/lang/translation/jvm.lux @@ -1,10 +1,11 @@ (.module: - [lux (#- Definition) + [lux (#- Type Definition) + ["." host (#+ import: do-to object)] [abstract [monad (#+ do)]] [control pipe - ["ex" exception (#+ exception:)] + ["." exception (#+ exception:)] ["." io (#+ IO io)] [concurrency ["." atom (#+ Atom atom)]]] @@ -17,9 +18,10 @@ ["." array] [list ("#/." functor)] ["." dictionary (#+ Dictionary)]]] - ["." host (#+ import: do-to object) + [target [jvm - ["." loader (#+ Library)]]] + ["." loader (#+ Library)] + ["." type (#+ Type)]]] [world [binary (#+ Binary)]] [tool @@ -28,7 +30,6 @@ [/// [host ["." jvm (#+ Inst Definition Host State) - ["." type] ["." def] ["." inst]]]] ) @@ -49,19 +50,22 @@ (type: #export ByteCode Binary) (def: #export value-field Text "_value") -(def: #export $Object jvm.Type (type.class "java.lang.Object" (list))) +(def: #export $Object Type (type.class "java.lang.Object" (list))) (exception: #export (cannot-load {class Text} {error Text}) - (ex.report ["Class" class] - ["Error" error])) + (exception.report + ["Class" class] + ["Error" error])) (exception: #export (invalid-field {class Text} {field Text} {error Text}) - (ex.report ["Class" class] - ["Field" field] - ["Error" error])) + (exception.report + ["Class" class] + ["Field" field] + ["Error" error])) (exception: #export (invalid-value {class Text}) - (ex.report ["Class" class])) + (exception.report + ["Class" class])) (def: (class-value class-name class) (-> Text (Class Object) (Error Any)) @@ -74,13 +78,13 @@ (#error.Success value) #.None - (ex.throw invalid-value class-name)) + (exception.throw invalid-value class-name)) (#error.Failure error) - (ex.throw cannot-load [class-name error])) + (exception.throw cannot-load [class-name error])) (#error.Failure error) - (ex.throw invalid-field [class-name ..value-field error]))) + (exception.throw invalid-field [class-name ..value-field error]))) (def: class-path-separator ".") @@ -147,8 +151,7 @@ (def: #export runtime-class "LuxRuntime") (def: #export function-class "LuxFunction") -(def: #export runnable-class "LuxRunnable") -(def: #export $Variant jvm.Type (type.array 1 ..$Object)) -(def: #export $Tuple jvm.Type (type.array 1 ..$Object)) -(def: #export $Function jvm.Type (type.class ..function-class (list))) +(def: #export $Variant Type (type.array 1 ..$Object)) +(def: #export $Tuple Type (type.array 1 ..$Object)) +(def: #export $Function Type (type.class ..function-class (list))) |