On 16 April 2010 15:59, zaxis <z_a...@163.com> wrote:
>
> instance (BinaryDefer a, BinaryDefer b) => BinaryDefer (a,b) where
>    put (a,b) = put2 a b
>    get = get2 (,)
>    size x = let ~(a,b) = x in size a + size b
>    putFixed (a,b) = putFixed2 a b
>    getFixed = getFixed2 (,)
>
> in `size` function, what does the `~` mean ?

A lazy pattern match: http://en.wikibooks.org/wiki/Haskell/Laziness
(there is a better name for it, but I can't remember).


-- 
Ivan Lazar Miljenovic
ivan.miljeno...@gmail.com
IvanMiljenovic.wordpress.com
_______________________________________________
Haskell-Cafe mailing list
Haskell-Cafe@haskell.org
http://www.haskell.org/mailman/listinfo/haskell-cafe

Reply via email to