diff options
Diffstat (limited to '')
-rw-r--r-- | stdlib/source/lux/host.jvm.lux | 25 |
1 files changed, 20 insertions, 5 deletions
diff --git a/stdlib/source/lux/host.jvm.lux b/stdlib/source/lux/host.jvm.lux index d0952f71e..b34cd4242 100644 --- a/stdlib/source/lux/host.jvm.lux +++ b/stdlib/source/lux/host.jvm.lux @@ -32,7 +32,7 @@ [encoding ["." name (#+ External)]] ["." type (#+ Type Argument Typed) - ["." category (#+ Void Value Return Method Primitive Object Class Array Var Parameter Declaration)] + ["." category (#+ Void Value' Value Return' Return Method Primitive Object Class Array Var Parameter Declaration)] ["." box] ["." descriptor] ["." signature] @@ -44,8 +44,15 @@ (|>> name.internal name.read)) -(def: signature (|>> type.signature signature.signature)) -(def: reflection (|>> type.reflection reflection.reflection)) +(def: signature + (All [category] + (-> (Type category) Text)) + (|>> type.signature signature.signature)) + +(def: reflection + (All [category] + (-> (Type (<| Return' Value' category)) Text)) + (|>> type.reflection reflection.reflection)) (template [<name> <class>] [(def: #export <name> .Type (#.Primitive <class> #.Nil))] @@ -657,7 +664,9 @@ ))))) (def: (itself^ type) - (All [a] (-> (Type a) (Parser (Type a)))) + (All [category] + (-> (Type (<| Return' Value' category)) + (Parser (Type (<| Return' Value' category))))) (do <>.monad [_ (<c>.identifier! ["" (..reflection type)])] (wrap type))) @@ -690,9 +699,15 @@ (..array^ type^) )))) +(def: void^ + (Parser (Type Void)) + (do <>.monad + [_ (<c>.identifier! ["" (reflection.reflection reflection.void)])] + (wrap type.void))) + (def: (return^ imports type-vars) (-> Context (List (Type Var)) (Parser (Type Return))) - (<>.either (itself^ type.void) + (<>.either ..void^ (..type^ imports type-vars))) (def: var^ |