Hugs ffi, sizeOf operator

Alastair Reid alastair@reid-consulting-uk.ltd.uk
Tue, 07 Jan 2003 18:07:29 +0000


> On Mon, Jan 06, 2003 at 03:42:27PM -0500, R. Legere wrote:
>> Hugs says: sizeOf x::CDouble is 4, wheras 'C' says sizeof(double)
>> is 8.

Incidentally, notice that Double and Float have the same
representation in Hugs so Hugs' internal representation
of HsFloat and HsDouble will not be float and double.
Rather, it will be float and float or double and double.

This is probably where the confusion stems from.

Fixing this situation has been on my todo list for some time though
I'd be happy to put it on someone else's todo list instead.  All the
bits are in place to fix this - it's just a question of systematically
going through all the relevant parts making them use the right
representation.

--
Alastair Reid                 alastair@reid-consulting-uk.ltd.uk  
Reid Consulting (UK) Limited  http://www.reid-consulting-uk.ltd.uk/alastair/