In the below code, the line marked by
%%% b tries to install the functor X at a remote
machine foo.
When the functor is called in the following
block 'local ... end',
it failed with the error message:
% type error
% Expected type: class
% At argumen: 1
% In statement: {Object.newObject <Resource> _<optimized>}
% Call Stack:
% procedure in file ".../bar.oz", in line 10, column 3, PC= nnnn.
--------------------------------------
If I replace the line %%% b with the line %%% a,
i.e.
the functor is installed locally,
then
the same block 'local ... end' can run successfully.
[ note: both local and remote machines are Sun Sparc
with SunOS 5.10
and have Mozart-oz version 1.3.2 ]
Can anyone help me out here ?
THanks
HP
---------------------- bar.oz ------------------
declare R C X
R = {New Remote.manager init(host:foo fork:ssh)}
X = functor
import Open
export p:P
define
proc {P Cmd ?R}
thread
{{New Open.pipe init(cmd: "sh" args:['-c' Cmd])}
read(list:R size:all)}
end
end
end
% [C] = {Module.apply [X]} %%% a -- to run on local host
{R apply(X C)} %%% b -- to run on remoate host
local L Cmd in
Cmd = "ls a_path | wc"
{C.p Cmd L}
{System.showInfo L}
end
_________________________________________________________________________________
mozart-users mailing list
[email protected]
http://www.mozart-oz.org/mailman/listinfo/mozart-users