17 Feb
2007
17 Feb
'07
11:58 p.m.
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 else fromJust maybeLong (It always returns 0) Could anyone give me a hint as to what the problem is? Thanks!