[Haskell-beginners] Overflow when reading C types

ml at extensibl.com ml at extensibl.com
Sun Dec 1 23:09:30 UTC 2013


On Mon, Dec 02, 2013 at 11:38:33AM +1300, ml at extensibl.com wrote:
> 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.
> 

Whoops, that is not related to the original question, sorry.



More information about the Beginners mailing list