From fb1a1d4b86f95cc16bdf0e7872dd20901023f6c6 Mon Sep 17 00:00:00 2001
From: Eduardo Julian
Date: Tue, 6 Feb 2018 21:12:06 -0400
Subject: - Fixed some failing new-luxc tests. - Re-designed the way casting is
done for JVM interop. - Now always adding extensions when initializing
compiler.
---
.../lang/translation/jvm/procedure/host.jvm.lux | 112 ++++++++++-----------
1 file changed, 52 insertions(+), 60 deletions(-)
(limited to 'new-luxc/source/luxc/lang/translation/jvm')
diff --git a/new-luxc/source/luxc/lang/translation/jvm/procedure/host.jvm.lux b/new-luxc/source/luxc/lang/translation/jvm/procedure/host.jvm.lux
index f585fb10c..609a0833c 100644
--- a/new-luxc/source/luxc/lang/translation/jvm/procedure/host.jvm.lux
+++ b/new-luxc/source/luxc/lang/translation/jvm/procedure/host.jvm.lux
@@ -424,6 +424,35 @@
_
(&.throw @.Wrong-Syntax (@.wrong-syntax proc inputs))))
+(def: (object//cast proc translate inputs)
+ (-> Text @.Proc)
+ (case inputs
+ (^ (list [_ (#.Text from)] [_ (#.Text to)] valueS))
+ (do macro.Monad
+ [valueI (translate valueS)]
+ (case [from to]
+ ## Wrap
+ (^template [