Hi, All

I am encountering a minor difficulty getting greencard files to work with
GHC. First of all, when greencard spits out a .hs and you give it to ghc,
it complains. The problem,for example, is the following:

_casm_ ``do {double arg1;double res1;
                 arg1 = (double)%0;
                 do { res1=sin(arg1);
                     
                     %r = (double)(res1);} while(0);} while(0);'' arg1

With the error being "parse error"

The '' and `` can be substituted by " and the compiler no longer
complains... Is this correct?

Ok, fine. But, when I now pass this augmented file to ghc for compilation,
it manages to say: 

T2.hs:10: Variable not in scope: `_casm_'

Compilation had errors

Or, in verbose mode:

Haskell compiler:
        /usr/lib/ghc-4.06/hsc /tmp/ghc27959.cpp  -funfold-casms-in-hi-file
-ffoldr-build-on -fdo-eta-reduction -fdo-lambda-eta-expansion
-fcase-of-case -fcase-merge -flet-to-case -fpedantic-bottoms -fsimplify [
-finline-phase0 -fno-rules -fmax-simplifier-iterations2 ] -fspecialise
-ffull-laziness -ffloat-inwards -fsimplify [ -finline-phase1
-fmax-simplifier-iterations4 ]  -fsimplify [ -finline-phase2
-fmax-simplifier-iterations4 ] -fstrictness -fcpr-analyse -fworker-wrapper
-fsimplify [ -fmax-simplifier-iterations4 ] -ffull-laziness -fcse
-ffloat-inwards -fsimplify [ -fmax-simplifier-iterations4 ]
-flet-no-escape -fwarn-overlapping-patterns -fwarn-missing-methods
-fwarn-missing-fields -fwarn-duplicate-exports -fhi-version=406 -static
"-himap=/usr/lib/ghc-4.06%.hi:/usr/local/greencard-2.0/lib/ghc%.hi:/usr/lib/ghc-4.06/imports/std%.hi:/usr/lib/ghc-4.06/imports/data%.hi:/usr/lib/ghc-4.06/imports/lang%.hi:.%.hi:/usr/lib/ghc-4.06/imports/std%.hi"
"-himap-sep=:"    -v -hifile=/tmp/ghc27959.hi -C=/tmp/ghc27959.hc
-F=/tmp/ghc27959_stb.c -FH=/tmp/ghc27959_stb.h +RTS -H6000000 -K1000000
Glasgow Haskell Compiler, version 4.06, for Haskell 98, compiled by GHC
version 4.04

T2.hs:10: Variable not in scope: `_casm_'

Compilation had errors

Command exited with non-zero status 1
2.07user 0.11system 0:02.18elapsed 99%CPU (0avgtext+0avgdata
0maxresident)k
0inputs+0outputs (1332major+1864minor)pagefaults 0swaps
deleting... /tmp/ghc27959.cpp /tmp/ghc27959.hi /tmp/ghc27959.hc
/tmp/ghc27959_stb.c /tmp/ghc27959_stb.h ghc27959.c ghc27959.s
/tmp/ghc27959_o.s T.o /tmp/ghc27959.cpp /tmp/ghc27959.hi /tmp/ghc27959.hc
/tmp/ghc27959_stb.c /tmp/ghc27959_stb.h

rm -f /tmp/ghc27959*

Can anyone help?

Thanks,

Andrei


Reply via email to