[Fwd: cvs commit: fptools/libraries/base/Foreign/C Types.hs
CPUTime.hsc Directory.hs Time.hsc fptools/libraries/base/System/Posix
Types.hs fptools/libraries/base/include CTypes.h]
Sven.Panne at aedion.de
Sun Jun 13 17:05:49 EDT 2004
I've just commited a change to the fptools repository, proposing a minor change
in the FFI spec, see below. Comments welcome.
-------- Original Message --------
Subject: cvs commit: fptools/libraries/base/Foreign/C Types.hs fptools/libraries/base/System CPUTime.hsc Directory.hs Time.hsc fptools/libraries/base/System/Posix Types.hs fptools/libraries/base/include CTypes.h
Date: Sun, 13 Jun 2004 14:03:47 -0700
From: Sven Panne <panne at glass.cse.ogi.edu>
To: cvs-libraries at haskell.org
panne 2004/06/13 14:03:47 PDT
libraries/base/System CPUTime.hsc Directory.hs Time.hsc
Changes related to arithmetic types:
* Renamed macros NUMERIC_FOO to ARITHMETIC_FOO to match C99-speak
* ARITHMETIC_TYPEs now have a Real instance, otherwise they are quite useless.
Note that this differs from the FFI spec, but the spec should very probably
changed in this respect.
* Some changes to fix the wrong assumption that CTime/CClock are integral types,
C99 in fact guarantees only that they are arithmetic types. This has been
accomplished by using
realToInteger = round . realToFrac :: Real a => a -> Integer
instead of fromIntegral for CTime/CClock. I'm not sure if we could do better,
going via Double seems to be overkill, but I couldn't think of a better way.
GHC could e.g. use RULES here. Improvements welcome.
Revision Changes Path
1.22 +2 -2 fptools/libraries/base/Foreign/C/Types.hs
1.15 +5 -4 fptools/libraries/base/System/CPUTime.hsc
1.25 +2 -1 fptools/libraries/base/System/Directory.hs
1.26 +7 -4 fptools/libraries/base/System/Time.hsc
1.14 +3 -3 fptools/libraries/base/System/Posix/Types.hs
1.8 +12 -13 fptools/libraries/base/include/CTypes.h
Cvs-libraries mailing list
Cvs-libraries at haskell.org
More information about the FFI