From aafe7ff59792af6125574114312d5fc9ed15b5b7 Mon Sep 17 00:00:00 2001 From: dos-reis Date: Sat, 15 Jun 2013 21:43:42 +0000 Subject: * interp/ht-util.boot (mkCurryFun): Import function name. --- src/ChangeLog | 4 ++++ src/interp/fortcall.boot | 6 +++--- src/interp/ht-util.boot | 1 + 3 files changed, 8 insertions(+), 3 deletions(-) (limited to 'src') diff --git a/src/ChangeLog b/src/ChangeLog index 744e0454..ea87f587 100644 --- a/src/ChangeLog +++ b/src/ChangeLog @@ -1,3 +1,7 @@ +2013-06-15 Gabriel Dos Reis + + * interp/ht-util.boot (mkCurryFun): Import function name. + 2013-06-15 Gabriel Dos Reis * boot/tokens.boot (importSymbol): New builtin. diff --git a/src/interp/fortcall.boot b/src/interp/fortcall.boot index 7f4a05ff..8184539d 100644 --- a/src/interp/fortcall.boot +++ b/src/interp/fortcall.boot @@ -753,7 +753,7 @@ multiToUnivariate f == body := copyTree third f newVariable := gensym() for index in 0..#vars-1 repeat - -- Remember that AXIOM lists, vectors etc are indexed from 1 + -- Remember that OpenAxiom lists, vectors etc are indexed from 1 body := substitute!(["elt",newVariable,index+1],vars.index,body) -- We want a Vector DoubleFloat -> DoubleFloat target := [["DoubleFloat"],["Vector",["DoubleFloat"]]] @@ -776,7 +776,7 @@ functionAndJacobian f == jacBodies := CDDR interpret [["$elt",["List",["InputForm"]],"construct"],:jacBodies] newVariable := gensym() for index in 0..#vars-1 repeat - -- Remember that AXIOM lists, vectors etc are indexed from 1 + -- Remember that OpenAxiom lists, vectors etc are indexed from 1 funBodies := substitute!(["elt",newVariable,index+1],vars.index,funBodies) jacBodies := substitute!(["elt",newVariable,index+1],vars.index,jacBodies) target := [["Vector",["DoubleFloat"]],["Vector",["DoubleFloat"]],["Integer"]] @@ -798,7 +798,7 @@ vectorOfFunctions f == funBodies := copyTree CDADDR f newVariable := gensym() for index in 0..#vars-1 repeat - -- Remember that AXIOM lists, vectors etc are indexed from 1 + -- Remember that OpenAxiom lists, vectors etc are indexed from 1 funBodies := substitute!(["elt",newVariable,index+1],vars.index,funBodies) target := [["Vector",["DoubleFloat"]],["Vector",["DoubleFloat"]]] rest interpret ["ADEF",[newVariable],target,[[],[]],["vector",["construct",:funBodies]]] diff --git a/src/interp/ht-util.boot b/src/interp/ht-util.boot index a24c1cb3..197675ce 100644 --- a/src/interp/ht-util.boot +++ b/src/interp/ht-util.boot @@ -287,6 +287,7 @@ beforeAfter(x,u) == [[y for [y,:r] in tails u while x ~= y],r] mkCurryFun(fun, val) == name := gensym() + importSymbol name code := ['DEFUN, name, '(arg), ['APPLY, MKQ fun, ['CONS, 'arg, MKQ val]]] eval code -- cgit v1.2.3