Hi,

I have got the last version of green-card (05/05/98) from Glasgow FTP server.
I know that the follow lines were added in the StdDIS.gc file for using
with ghc 2.10

> -- If you're using ghc-2.10 on a 
> #include "config.h"
> #if __GLASGOW_HASKELL__ <= 300 && ! cygwin32_TARGET_OS
> instance CCallable Word32
> instance CReturnable Word32
> instance CCallable Int32
> instance CReturnable Int32
> #endif

but It has a problem when I run make all ...

> sol(/usr1/fcional/apps/haskell/green-card-v2)$ make all
> make[1]: Entering directory `/usr1/fcional/apps/haskell/green-card-v2/src'
> make[1]: Leaving directory `/usr1/fcional/apps/haskell/green-card-v2/src'
> make[1]: Entering directory `/usr1/fcional/apps/haskell/green-card-v2/lib'
> make[2]: Entering directory
`/usr1/fcional/apps/haskell/green-card-v2/lib/ghc'
> ../../src/green-card --target ghc StdDIS.gc
> /usr1/fcional/bin/ghc2.10 -cpp -fglasgow-exts -fno-prune-tydecls -fvia-C
-c StdDIS.hs -o StdDIS.o
>  
> StdDIS.hs:42: Unacceptable instance type for ccall-ish class
>                 class `CReturnable' type `Int32'
 
> StdDIS.hs:41: Unacceptable instance type for ccall-ish class
>                 class `CCallable' type `Int32'
> 
> Compilation had errors
> make[2]: *** [StdDIS.o] Error 1
> make[2]: Leaving directory
`/usr1/fcional/apps/haskell/green-card-v2/lib/ghc'
> make[2]: Entering directory
`/usr1/fcional/apps/haskell/green-card-v2/lib/hugs'
> make[2]: Nothing to be done for `all'.
> make[2]: Leaving directory
`/usr1/fcional/apps/haskell/green-card-v2/lib/hugs'
> make[1]: Leaving directory `/usr1/fcional/apps/haskell/green-card-v2/lib'

If I take out

> instance CCallable Int32
> instance CReturnable Int32

it works, but I can't compile the next module

> module Rand (srand, rand) where
> import StdDis
> 
> %#include <stdlib.h>
> 
> %fun srand :: Int -> IO ()
> 
> %fun rand :: IO Int

because the following message error appears ...

> % green-card --target ghc Rand.gc
> I/O error: "Rand.gc", proc. spec "srand", line 10:
>       marshall: Don't know how to marshall (int arg1)
> 
> "Rand.gc", proc. spec "rand", line 12:
>       Don't know how to unmarshall (iO (int res1))

I just want to compile it

How can I do it?
Should do I use the previous version of the green-card?
or Are there same errors in the above module?

I have been using a machine running Solaris 2.4 and ghc version 2.10.
I will appreciate so much your help.

Thanks in advance.

Pablo

----------------------------------------------------------------------
             Mocciola Pablo
             LIFIA -  Facultad de Ciencias Exactas - UNLP          
             50 y 115                    (1900)  La Plata
             TE: +54 21 42738          FAX: +54 21 228252
             Postal Address:   CC 11  
             E-mail Address:   [EMAIL PROTECTED] 
             http://www-lifia.info.unlp.edu.ar/~pablom
----------------------------------------------------------------------

Reply via email to