
3 Feb
2007
3 Feb
'07
10 p.m.
ekarttun:
Hello
I keep wanting something like:
binarySize :: Binary a => Proxy a -> (Int,Maybe Int)
in the Data.Binary for returning the minimum and maximum (or Nothing for infinite) space requirements for objects of a given type.
Proxy is just defined as "data Proxy t = Proxy", but omitting it is also possible. Would other people consider this an useful addition?
Yes, I've thought this would be useful too. A la 'sizeOf' in Storable. Should it be a member of the Binary class? -- Don