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

Jeff Shaw shawjef3 at gmail.com
Fri Mar 29 01:30:37 CET 2013


On 3/28/2013 5:11 PM, Henning Thielemann wrote:
>
> On Thu, 28 Mar 2013, Brandon Allbery wrote:
>
>> If CTime is only for interfacing with C, then there should not be any 
>> arithmetic or bit manipulation
>> class instances of it, only some conversion functions between CTime 
>> and Haskell time representations.
>>
>>
>> ...and implementing those should be as painful as possible?
>
> Implementing these conversion functions means unpacking data from the 
> CTime constructor and convert it to Haskell time representations or 
> vice versa. I don't think it is possible to write conversion functions 
> using Num and Bits that work on all architectures. If there is 
> functionality that can be used on multiple architectures this should 
> be provided as helper functions.
>
> _______________________________________________
> Libraries mailing list
> Libraries at haskell.org
> http://www.haskell.org/mailman/listinfo/libraries
Please tell us which Haskell compiler targets a platform with a CTime 
representation that supports Num, but wouldn't support Integral, Bits, 
or Enum. Or heck, what Haskell target platform's time_t isn't an integer?

Jeff



More information about the Libraries mailing list