aboutsummaryrefslogtreecommitdiff
path: root/new-luxc/source/luxc/lang/translation/scheme/primitive.jvm.lux
diff options
context:
space:
mode:
authorEduardo Julian2018-04-18 01:28:24 -0400
committerEduardo Julian2018-04-18 01:28:24 -0400
commit7d539a83fd55f7ced7657302054e099955b55ae2 (patch)
tree6aa50f8d58d87da48880569ed2f748e8bc014243 /new-luxc/source/luxc/lang/translation/scheme/primitive.jvm.lux
parent6eb9cf17f161522d4eddf6783284952f8a84f099 (diff)
- Initial Scheme back-end implementation.
Diffstat (limited to '')
-rw-r--r--new-luxc/source/luxc/lang/translation/scheme/primitive.jvm.lux30
1 files changed, 30 insertions, 0 deletions
diff --git a/new-luxc/source/luxc/lang/translation/scheme/primitive.jvm.lux b/new-luxc/source/luxc/lang/translation/scheme/primitive.jvm.lux
new file mode 100644
index 000000000..c7043eeb7
--- /dev/null
+++ b/new-luxc/source/luxc/lang/translation/scheme/primitive.jvm.lux
@@ -0,0 +1,30 @@
+(.module:
+ lux
+ (lux [macro "meta/" Monad<Meta>])
+ (luxc (lang (host [scheme #+ Expression])))
+ [//]
+ (// [".T" runtime]))
+
+(def: #export translate-bool
+ (-> Bool (Meta Expression))
+ (|>> scheme.bool meta/wrap))
+
+(def: #export translate-int
+ (-> Int (Meta Expression))
+ (|>> scheme.int meta/wrap))
+
+(def: #export translate-nat
+ (-> Nat (Meta Expression))
+ (|>> (:! Int) scheme.int meta/wrap))
+
+(def: #export translate-deg
+ (-> Deg (Meta Expression))
+ (|>> (:! Int) scheme.int meta/wrap))
+
+(def: #export translate-frac
+ (-> Frac (Meta Expression))
+ (|>> scheme.float meta/wrap))
+
+(def: #export translate-text
+ (-> Text (Meta Expression))
+ (|>> scheme.string meta/wrap))