[project @ 2004-06-13 21:03:46 by panne]
authorpanne <unknown>
Sun, 13 Jun 2004 21:03:47 +0000 (21:03 +0000)
committerpanne <unknown>
Sun, 13 Jun 2004 21:03:47 +0000 (21:03 +0000)
commitbccd35aa801c910b7db3f94ac16f2b18bdf9f108
treea1b0c93c9854cc3a0917af64c671ec203fe07282
parentea98be462413c2785386967865a511b3405bb031
[project @ 2004-06-13 21:03:46 by panne]
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.
Foreign/C/Types.hs
System/CPUTime.hsc
System/Directory.hs
System/Posix/Types.hs
System/Time.hsc
include/CTypes.h