diff options
author | Eduardo Julian | 2018-04-14 02:02:13 -0400 |
---|---|---|
committer | Eduardo Julian | 2018-04-14 02:02:13 -0400 |
commit | 4ef2dbc49cd6dae1b8235dfd13dcd298c8aa3bfe (patch) | |
tree | db12bd62ab3e1c9767bfe43edc030e3bfc77ef95 /new-luxc/source/luxc/lang/translation/r/primitive.jvm.lux | |
parent | ca238f9c89d3156842b0a3d5fe24a5d69b2eedb0 (diff) |
- Initial R back-end implementation.
Diffstat (limited to 'new-luxc/source/luxc/lang/translation/r/primitive.jvm.lux')
-rw-r--r-- | new-luxc/source/luxc/lang/translation/r/primitive.jvm.lux | 30 |
1 files changed, 30 insertions, 0 deletions
diff --git a/new-luxc/source/luxc/lang/translation/r/primitive.jvm.lux b/new-luxc/source/luxc/lang/translation/r/primitive.jvm.lux new file mode 100644 index 000000000..2afe41421 --- /dev/null +++ b/new-luxc/source/luxc/lang/translation/r/primitive.jvm.lux @@ -0,0 +1,30 @@ +(.module: + lux + (lux [macro "meta/" Monad<Meta>]) + (luxc (lang (host [r #+ Expression Statement]))) + [//] + (// [".T" runtime])) + +(def: #export translate-bool + (-> Bool (Meta Expression)) + (|>> r.bool meta/wrap)) + +(def: #export translate-int + (-> Int (Meta Expression)) + (|>> runtimeT.int meta/wrap)) + +(def: #export translate-nat + (-> Nat (Meta Expression)) + (|>> (:! Int) runtimeT.int meta/wrap)) + +(def: #export translate-deg + (-> Deg (Meta Expression)) + (|>> (:! Int) runtimeT.int meta/wrap)) + +(def: #export translate-frac + (-> Frac (Meta Expression)) + (|>> r.float meta/wrap)) + +(def: #export translate-text + (-> Text (Meta Expression)) + (|>> r.string meta/wrap)) |