[Haskell-beginners] Overflow when reading C types

ml at extensibl.com ml at extensibl.com
Sun Dec 1 22:38:33 UTC 2013


On Mon, Dec 02, 2013 at 11:30:50AM +1300, Patrick Redmond wrote:
> Prelude> import Foreign.C.Types
> Prelude Foreign.C.Types> read "-10" :: CUInt
> 4294967286
> Prelude Foreign.C.Types> read "300" :: CChar
> 44
> 

CUInt? I would try CInt instead.

A.


More information about the Beginners mailing list