
19 Dec
2008
19 Dec
'08
4:09 a.m.
On Thu, 2008-12-18 at 22:35 -0500, wren ng thornton wrote:
In a similar vein, is there already a function available to give the size of Word in bytes? Or should I write the usual Ptr conversion tricks to figure it out?
How about this: (`div` 8) $ ceiling $ logBase 2 $ fromIntegral (maxBound :: Word) Could write an integral log_2 function to make it nicer :) - George