From bcd3d9ee8f6797f758a2abea98d5cb6a74cc7df0 Mon Sep 17 00:00:00 2001 From: Eduardo Julian Date: Fri, 15 Jun 2018 00:11:33 -0400 Subject: - WIP: Adjustments to new-luxc based on recent changes to stdlib. --- new-luxc/source/luxc/lang/translation/scheme/function.jvm.lux | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'new-luxc/source/luxc/lang/translation/scheme/function.jvm.lux') diff --git a/new-luxc/source/luxc/lang/translation/scheme/function.jvm.lux b/new-luxc/source/luxc/lang/translation/scheme/function.jvm.lux index 0d03b31a3..87821f2a0 100644 --- a/new-luxc/source/luxc/lang/translation/scheme/function.jvm.lux +++ b/new-luxc/source/luxc/lang/translation/scheme/function.jvm.lux @@ -26,7 +26,7 @@ (def: $missing (_.var "missing")) (def: input-declaration - (|>> n/inc referenceT.variable)) + (|>> inc referenceT.variable)) (def: (with-closure function-name inits function-definition) (-> Text (List Expression) Expression (Meta Expression)) @@ -56,7 +56,7 @@ (//.with-anchor [function-name +1] (translate bodyS)))) closureO+ (monad.map @ referenceT.translate-variable env) - #let [arityO (|> arity nat-to-int _.int) + #let [arityO (|> arity .int _.int) $num_args (_.var "num_args") $function (_.var function-name) apply-poly (function (_ args func) @@ -66,7 +66,7 @@ (_.let (list [$num_args (_.length (@@ $curried))]) (<| (_.if (|> (@@ $num_args) (_.= arityO)) (_.let (list [(referenceT.variable +0) (@@ $function)]) - (_.let-values (list [(|> (list.n/range +0 (n/dec arity)) + (_.let-values (list [(|> (list.n/range +0 (dec arity)) (list/map input-declaration) _.poly) (_.apply (_.global "apply") (list (_.global "values") (@@ $curried)))]) -- cgit v1.2.3