diff options
Diffstat (limited to 'new-luxc/source/luxc/generator/primitive.jvm.lux')
-rw-r--r-- | new-luxc/source/luxc/generator/primitive.jvm.lux | 36 |
1 files changed, 0 insertions, 36 deletions
diff --git a/new-luxc/source/luxc/generator/primitive.jvm.lux b/new-luxc/source/luxc/generator/primitive.jvm.lux deleted file mode 100644 index 637f46a85..000000000 --- a/new-luxc/source/luxc/generator/primitive.jvm.lux +++ /dev/null @@ -1,36 +0,0 @@ -(;module: - lux - (lux (control monad) - (data text/format) - [meta "meta/" Monad<Meta>]) - (luxc ["&" base] - [";L" host] - (host ["$" jvm] - (jvm ["$i" inst] - ["$t" type])) - (lang ["la" analysis] - ["ls" synthesis]) - (generator ["&;" common])) - [../runtime]) - -(def: #export generate-unit - (Meta $;Inst) - (meta/wrap ($i;string hostL;unit))) - -(def: #export (generate-bool value) - (-> Bool (Meta $;Inst)) - (meta/wrap ($i;GETSTATIC "java.lang.Boolean" - (if value "TRUE" "FALSE") - ($t;class "java.lang.Boolean" (list))))) - -(do-template [<name> <type> <load> <wrap>] - [(def: #export (<name> value) - (-> <type> (Meta $;Inst)) - (meta/wrap (|>. (<load> value) <wrap>)))] - - [generate-nat Nat (|>. (:! Int) $i;long) ($i;wrap #$;Long)] - [generate-int Int $i;long ($i;wrap #$;Long)] - [generate-deg Deg (|>. (:! Int) $i;long) ($i;wrap #$;Long)] - [generate-frac Frac $i;double ($i;wrap #$;Double)] - [generate-text Text $i;string id] - ) |