GreenCard (How to Marshell Int64)
Liwen Huang
liwen.huang at yale.edu
Fri Dec 12 08:55:45 EST 2003
----- Original Message -----
From: "Axel Simon" <A.Simon at kent.ac.uk>
To: "Liwen Huang" <liwen.huang at yale.edu>
Cc: <Haskell at haskell.org>
Sent: Friday, December 12, 2003 8:50 AM
Subject: Re: GreenCard (How to Marshell Int64)
> On Thu, Dec 11, 2003 at 08:55:25PM -0500, Liwen Huang wrote:
> > Hello:
> >
> > I am using GreenCard to import some C code into Haskell. The
code I want to import uses "long" in a lot of places. I tried to write my
own DIS for it and I also write a very simple test program. However, the DIS
does not work properly. My program and test result are as following:
>
> --------------------------------------------------------------------------
> > module TLong where
> >
> > import Foreign.GreenCard
> >
> > type Long = Int64
> > %dis long x = int64 x
>
> Just out of curiosity: Are you sure that the long C types on your system
> actually refer to 64-bit integer. On most platform they refer to 32 bit
> types. You would need long long to get 64 bit integers.
>
> Axel.
Oops. My "long" is indeed Int32 :(. Thank you for pointing that out.
Liwen
More information about the Haskell
mailing list