aboutsummaryrefslogtreecommitdiff
path: root/new-luxc/source/luxc/lang/translation/common-lisp/primitive.jvm.lux
diff options
context:
space:
mode:
authorEduardo Julian2018-04-25 22:50:15 -0400
committerEduardo Julian2018-04-25 22:50:15 -0400
commitfac2fa47c11db08596c890290bae09bf57a27089 (patch)
tree3ecf21857d43b5f630c114277e111682e493567a /new-luxc/source/luxc/lang/translation/common-lisp/primitive.jvm.lux
parent7d539a83fd55f7ced7657302054e099955b55ae2 (diff)
- Initial Common Lisp back-end implementation.
Diffstat (limited to '')
-rw-r--r--new-luxc/source/luxc/lang/translation/common-lisp/primitive.jvm.lux30
1 files changed, 30 insertions, 0 deletions
diff --git a/new-luxc/source/luxc/lang/translation/common-lisp/primitive.jvm.lux b/new-luxc/source/luxc/lang/translation/common-lisp/primitive.jvm.lux
new file mode 100644
index 000000000..6bb4ec140
--- /dev/null
+++ b/new-luxc/source/luxc/lang/translation/common-lisp/primitive.jvm.lux
@@ -0,0 +1,30 @@
+(.module:
+ lux
+ (lux [macro "meta/" Monad<Meta>])
+ (luxc (lang (host ["_" common-lisp #+ Expression])))
+ [//]
+ (// [".T" runtime]))
+
+(def: #export translate-bool
+ (-> Bool (Meta Expression))
+ (|>> _.bool meta/wrap))
+
+(def: #export translate-int
+ (-> Int (Meta Expression))
+ (|>> _.int meta/wrap))
+
+(def: #export translate-nat
+ (-> Nat (Meta Expression))
+ (|>> (:! Int) _.int meta/wrap))
+
+(def: #export translate-deg
+ (-> Deg (Meta Expression))
+ (|>> (:! Int) _.int meta/wrap))
+
+(def: #export translate-frac
+ (-> Frac (Meta Expression))
+ (|>> _.double meta/wrap))
+
+(def: #export translate-text
+ (-> Text (Meta Expression))
+ (|>> _.string meta/wrap))