Is it possible to use green-card 0.9b together with ghc-2.04? I managed
to compile then green-card sources and it seems to work.
But when I tried to run the example from the paper, ghc-2.04 choked:
The files are:
The example from the paper:
module M where
%fun sin :: Float -> Float
sin2:: Float -> Float
sin2 x = sin (sin x))
results in this after green-card ran over it:
module M where
sin :: Float -> Float
sin (float arg1) =
unsafePerformPrimIO(
_casm_ ``do {arg1 = %0;
res;
res = sin(arg1);
%r = res ;} while(0);'' arg1 >>= \ res ->
return ((float res)))
sin2:: Float -> Float
sin2 x = sin (sin x))
And the compiler, when invoked with
ghc-2.04 -fvia-C -fglasgow-exts -c M.hs
says
M.hs:3:12: parse error on input: "arg1"
Any suggestions?
Stephan
--
Stephan Tobies, Student of Computer Science, RWTH Aachen
mailto:[EMAIL PROTECTED]
## There is much pleasure to be gained
from useless knowledge - B. Russel ##