On Fri, 18 Dec 2009, Gregory Crosswhite wrote:
Yay, advancePtr is exactly what I needed! I totally missed that one in the
docs.
Also thanks to those of you who pointed me to the scoped type variables
feature, since I had figured that a feature liked that had to exist but
I just didn't know where to look for it.
You do not need the Scoped Type Variables feature here, although it may
simplify writing. I remember we had a similar thread here, recently. A
solution can be:
sizeOfPtr :: Ptr a -> a -> Int
sizeOfPtr _ x = sizeOf x
to be called by (sizeOfPtr ptr undefined).
I have added this example to:
http://www.haskell.org/haskellwiki/Scoped_type_variables#Avoiding_Scoped_Type_Variables
But in order to be found in Category:FAQ we might need a different title.
_______________________________________________
Haskell-Cafe mailing list
[email protected]
http://www.haskell.org/mailman/listinfo/haskell-cafe