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

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


On Thu, Mar 28, 2013 at 8:20 AM, David Virebayre <dav.vire+haskell at gmail.com
> 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
conversion.

-- 
brandon s allbery kf8nh                               sine nomine associates
allbery.b at gmail.com                                  ballbery at sinenomine.net
unix, openafs, kerberos, infrastructure, xmonad        http://sinenomine.net
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.haskell.org/pipermail/libraries/attachments/20130328/b26d7d2c/attachment.htm>


More information about the Libraries mailing list