[Haskell-cafe] what does the '~' mean ?

2010-04-15 Thread zaxis
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 ? Sincerely! - fac n

Re: [Haskell-cafe] what does the '~' mean ?

2010-04-15 Thread Ivan Miljenovic
On 16 April 2010 15:59, zaxis 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 d

Re: [Haskell-cafe] what does the '~' mean ?

2010-04-16 Thread Stefan Holdermans
Ivan, >> 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). Irrefutable pattern? ;-) Cheers, Stefan ___ Haskell-Cafe mailing li

Re: [Haskell-cafe] what does the '~' mean ?

2010-04-16 Thread Magnus Therning
On 16/04/10 07:09, Ivan Miljenovic wrote: > On 16 April 2010 15:59, zaxis 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 >>getF

Re: [Haskell-cafe] what does the '~' mean ?

2010-04-16 Thread Ivan Lazar Miljenovic
Stefan Holdermans writes: > Irrefutable pattern? ;-) Ahhh, yes, that's it. I knew it started with `i', but that's about it... -- Ivan Lazar Miljenovic ivan.miljeno...@gmail.com IvanMiljenovic.wordpress.com ___ Haskell-Cafe mailing list Haskell-Cafe@h

Re: [Haskell-cafe] what does the '~' mean ?

2010-04-20 Thread Ryan Ingram
On Thu, Apr 15, 2010 at 10:59 PM, zaxis 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` functi