On 29 Mar 2008, at 10:21 PM, Jason Dusek wrote:
Stefan O'Rear <[EMAIL PROTECTED]> wrote:
The only type that you are allowed to assume corresponds to a C
int is
CInt, in the Foreign.C.Types module. This probably isn't the
problem,
but it could make problems of its own on a 64-bit or otherwise weird
system.
So say I turn everything back to pointers to CInt, what is the
accepted way to convert from CInt to Int
Use fromIntegral to go CInt -> Int, Int -> CInt. This only depends
on CInt being an Integral type.
and CInt to Char?
Use toEnum . fromIntegral
jcc
_______________________________________________
Haskell-Cafe mailing list
[email protected]
http://www.haskell.org/mailman/listinfo/haskell-cafe