aboutsummaryrefslogtreecommitdiff
path: root/new-luxc/source/luxc/lang/translation/jvm/function.lux
diff options
context:
space:
mode:
authorEduardo Julian2019-04-27 23:41:47 -0400
committerEduardo Julian2019-04-27 23:41:47 -0400
commitaf7f85c4eb724f2888ecce9c8b52d6d3bb1cd807 (patch)
tree9d2b80257b5c82ebcc9f17bd32e9771ea51cc708 /new-luxc/source/luxc/lang/translation/jvm/function.lux
parentaa7f1d12ae98da9726bf8bbdd3c494a671e3f94b (diff)
Moved JVM type machinery to stdlib.
Diffstat (limited to '')
-rw-r--r--new-luxc/source/luxc/lang/translation/jvm/function.lux16
1 files changed, 9 insertions, 7 deletions
diff --git a/new-luxc/source/luxc/lang/translation/jvm/function.lux b/new-luxc/source/luxc/lang/translation/jvm/function.lux
index 0fea18acd..ae876c3fc 100644
--- a/new-luxc/source/luxc/lang/translation/jvm/function.lux
+++ b/new-luxc/source/luxc/lang/translation/jvm/function.lux
@@ -1,5 +1,5 @@
(.module:
- [lux (#- function)
+ [lux (#- Type function)
[abstract
["." monad (#+ do)]]
[control
@@ -10,6 +10,9 @@
format]
[collection
["." list ("#/." functor monoid)]]]
+ [target
+ [jvm
+ ["." type (#+ Type Method)]]]
[tool
[compiler
[analysis (#+ Arity)]
@@ -21,7 +24,6 @@
[lang
[host
["$" jvm (#+ Label Inst Def Operation Phase)
- ["." type]
["." def]
["_" inst]]]]]
["." //
@@ -30,22 +32,22 @@
(def: arity-field Text "arity")
-(def: $Object $.Type (type.class "java.lang.Object" (list)))
+(def: $Object Type (type.class "java.lang.Object" (list)))
(def: (poly-arg? arity)
(-> Arity Bit)
(n/> 1 arity))
(def: (reset-method class)
- (-> Text $.Method)
+ (-> Text Method)
(type.method (list) (#.Some (type.class class (list))) (list)))
(def: (captured-args env)
- (-> (List Variable) (List $.Type))
+ (-> (List Variable) (List Type))
(list.repeat (list.size env) $Object))
(def: (init-method env arity)
- (-> (List Variable) Arity $.Method)
+ (-> (List Variable) Arity Method)
(if (poly-arg? arity)
(type.method (list.concat (list (captured-args env)
(list type.int)
@@ -158,7 +160,7 @@
_.ARETURN)))
(def: function-init-method
- $.Method
+ Method
(type.method (list type.int) #.None (list)))
(def: (function-init arity env-size)