Re: [Haskell-cafe] sizeOf on a type

14 Jan
2010
14 Jan
'10
12:51 p.m.
On Fri, 25 Dec 2009, Lennart Augustsson wrote:
sizeOfPtr :: Ptr a -> Int sizeOfPtr = sizeOf . (undefined :: Ptr a -> a)
No need for scoped type variables. But it does assume sizeOf does not use its argument.
That's even better. I'll add that to the Wiki. http://www.haskell.org/haskellwiki/Scoped_type_variables#Avoiding_Scoped_Typ...
5609
Age (days ago)
5609
Last active (days ago)
0 comments
1 participants
participants (1)
-
Henning Thielemann