aboutsummaryrefslogtreecommitdiff
path: root/new-luxc/source/luxc/lang/translation/primitive.jvm.lux
diff options
context:
space:
mode:
Diffstat (limited to 'new-luxc/source/luxc/lang/translation/primitive.jvm.lux')
-rw-r--r--new-luxc/source/luxc/lang/translation/primitive.jvm.lux35
1 files changed, 0 insertions, 35 deletions
diff --git a/new-luxc/source/luxc/lang/translation/primitive.jvm.lux b/new-luxc/source/luxc/lang/translation/primitive.jvm.lux
deleted file mode 100644
index 8fed1de18..000000000
--- a/new-luxc/source/luxc/lang/translation/primitive.jvm.lux
+++ /dev/null
@@ -1,35 +0,0 @@
-(.module:
- lux
- (lux (control monad)
- (data text/format)
- [macro "macro/" Monad<Meta>])
- (luxc ["&" lang]
- (lang [".L" host]
- (host ["$" jvm]
- (jvm ["$i" inst]
- ["$t" type]))
- ["la" analysis]
- ["ls" synthesis]
- (translation [".T" common]))))
-
-(def: #export translate-unit
- (Meta $.Inst)
- (macro/wrap ($i.string hostL.unit)))
-
-(def: #export (translate-bool value)
- (-> Bool (Meta $.Inst))
- (macro/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))
- (macro/wrap (|>> (<load> value) <wrap>)))]
-
- [translate-nat Nat (|>> (:! Int) $i.long) ($i.wrap #$.Long)]
- [translate-int Int $i.long ($i.wrap #$.Long)]
- [translate-deg Deg (|>> (:! Int) $i.long) ($i.wrap #$.Long)]
- [translate-frac Frac $i.double ($i.wrap #$.Double)]
- [translate-text Text $i.string id]
- )