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

Brandon Allbery allbery.b at
Thu Mar 28 14:46:02 CET 2013

On Thu, Mar 28, 2013 at 8:20 AM, David Virebayre <dav.vire+haskell at
> wrote:

> So, even if, in C, you may be able to apply arithmetic operations to a
> time_t, you can't be sure it makes sense, so you shouldn't normally do
> it. Why then, make it easier in Foreign.C to do something meaningless
> ? That's just begging to shoot yourself in the foot.

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

brandon s allbery kf8nh                               sine nomine associates
allbery.b at                                  ballbery at
unix, openafs, kerberos, infrastructure, xmonad
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <>

More information about the Libraries mailing list