On Sat, Feb 17, 2007 at 05:58:49PM -0600, ROBERT DOUGLAS HOELZ wrote:
> Hello,
>
> I want to convert a Haskell Integer (Data.Int.Int32) to a C long
> (Foreign.C.Types.CLong), but it seems this code here doesn't work:
>
> intToLong :: Int32 -> Clong
> intToLong num =
> let maybelong = cast nu
Hello,
I want to convert a Haskell Integer (Data.Int.Int32) to a C long
(Foreign.C.Types.CLong), but it seems this code here doesn't work:
intToLong :: Int32 -> Clong
intToLong num =
let maybelong = cast num
in if isNothing maybelong
then
0
els