Why does sizeOf Word64 = 4?

Ben Escoto bescoto at stanford.edu
Sun Nov 9 01:32:03 EST 2003


On Sun, 9 Nov 2003 08:51:11 +0000
Alastair Reid <alastair at reid-consulting-uk.ltd.uk> wrote:
> > Hi, I'm trying to learn about Haskell's FFI (running 6.0.1 on linux)
> > and see the following weird behavior with ghci:
> 
> You're seeing the right behaviour.
...
> The size of a Word64 value is 8 but the size of a pointer is always the same 
> no matter what the pointer points to.  Since most machines have 32-bit 
> addresses, the size of a pointer will be 4 on most machines.

Yes, I was confused and thought it would give me the size of what it
pointed instead of its size.  Thanks for all replies.


-- 
Ben Escoto


More information about the Glasgow-haskell-users mailing list