The numeric c types are (effectively) integral, too.

David Virebayre dav.vire+haskell at
Fri Mar 29 13:03:51 CET 2013

2013/3/28 Brandon Allbery <allbery.b at>:

> Because you need to convert it from a foreign representation, which may
> require arbitrary math depending on the details of that representation. And,
> while there may not be a strict meaning applied by the standard, there *is*
> a platform-dependent strict meaning (else times would be useless) *and* the
> conversion between the FFI and Haskell representations will need to know
> that platform-dependent meaning so that it can do a meaningful conversion.

Wouldn't it be safer, and more portable, to use either :

call ctime, and get a string you can parse
call localtime, get back a struct tm which has int members you can work with.

More information about the Libraries mailing list