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

Brandon Allbery allbery.b at gmail.com
Thu Mar 28 14:43:25 CET 2013


On Thu, Mar 28, 2013 at 6:32 AM, Jason Dusek <jason.dusek at gmail.com> wrote:

> One way to think of it is, CTime is time and should follow the
> rules of the time. Another way is, CTime is a C type and should
> follow the rules of C types.  The latter perspective seems more
> appropriate for Foreign.C.* (we are likely to seek out some
> other module for modelling time).
>

Phrasing this perhaps more clearly: the point of the FFI types is to
reflect foreign types. This may well include doing things which are legal
in the foreign type but not necessarily sensible for the conceptual type
--- and that may even be necessary in order to, say, convert that foreign
type to something more appropriate for Haskell.

It ain't pretty; but it's the FFI, it's not going to be pretty. Or well
behaved (just in case an interface that requires us to expose
unsafePerformIO didn't make that clear...).

-- 
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/bca88f68/attachment.htm>


More information about the Libraries mailing list