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/r/function.jvm.lux | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'new-luxc/source/luxc/lang/translation/r/function.jvm.lux') diff --git a/new-luxc/source/luxc/lang/translation/r/function.jvm.lux b/new-luxc/source/luxc/lang/translation/r/function.jvm.lux index 565a44909..5ecf21c3c 100644 --- a/new-luxc/source/luxc/lang/translation/r/function.jvm.lux +++ b/new-luxc/source/luxc/lang/translation/r/function.jvm.lux @@ -24,8 +24,8 @@ (def: $curried (r.var "curried")) (def: (input-declaration register) - (r.set! (referenceT.variable (n/inc register)) - (|> (@@ $curried) (r.nth (|> register n/inc nat-to-int r.int))))) + (r.set! (referenceT.variable (inc register)) + (|> (@@ $curried) (r.nth (|> register inc .int r.int))))) (def: (with-closure function-name inits function-definition) (-> Text (List Expression) Expression (Meta Expression)) @@ -57,7 +57,7 @@ (//.with-anchor [function-name +1] (translate bodyS)))) closureO+ (monad.map @ referenceT.translate-variable env) - #let [arityO (|> arity nat-to-int r.int) + #let [arityO (|> arity .int r.int) $num_args (r.var "num_args") $function (r.var function-name) var-args (r.code (format "list" (r.expression (@@ r.var-args)))) @@ -72,7 +72,7 @@ (r.cond (list [(|> (@@ $num_args) (r.= arityO)) ($_ r.then (r.set! (referenceT.variable +0) (@@ $function)) - (|> (list.n/range +0 (n/dec arity)) + (|> (list.n/range +0 (dec arity)) (list/map input-declaration) (list/fold r.then bodyO)))] [(|> (@@ $num_args) (r.> arityO)) -- cgit v1.2.3