<html><body style="font-family: 'Helvetica Neue',Helvetica,Arial,sans-serif; font-size: 12px;">Just in case it helps anyone's confusion, your equality constraint idea was on a reasonable track. When the ~ symbol appears *in a type signature* it is indeed an equality constraint. But in a pattern expression it's the marker for an irrefutable pattern.<div><br /></div><div>Regads,</div><div>Ben<br /><blockquote><br />----- Original Message -----<br /><div style="width:100%;background:rgb(228,228,228);"><div style="font-weight:bold;">From:</div> "Alexey Shmalko" <rasen.dubi@gmail.com></div><br /><div style="font-weight:bold;">To:</div>"Michael Jones" <mike@proclivis.com>, "<haskell-cafe@haskell.org>" <haskell-cafe@haskell.org><br /><div style="font-weight:bold;">Cc:</div><br /><div style="font-weight:bold;">Sent:</div>Fri, 15 May 2015 01:26:23 +0000<br /><div style="font-weight:bold;">Subject:</div>Re: [Haskell-cafe] Equality Contstraint?<br /><br /><br /><div dir="ltr">
<div>Hi, Michael,</div>
<div><br /></div>It's irrefutable pattern - the pattern that matches lazily. You can get more info here [1].<br /><br />Hope this helps,<div>Alexey Shmalko<br /><br />[1]: <a href="http://en.wikibooks.org/wiki/Haskell/Laziness#Lazy_pattern_matching">http://en.wikibooks.org/wiki/Haskell/Laziness#Lazy_pattern_matching</a>
</div>
</div>
<br /><div class="gmail_quote">On Fri, May 15, 2015 at 4:17 AM Michael Jones <<a href="mailto:mike@proclivis.com">mike@proclivis.com</a>> wrote:<br /><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;">I am poking around in Arrow to understand it better. There is the following definition:<br /><br />
    second :: a b c -> a (d,b) (d,c)<br />
    second f = arr swap >>> first f >>> arr swap<br />
      where<br />
        swap :: (x,y) -> (y,x)<br />
        swap ~(x,y) = (y,x)<br /><br />
Can someone explain what the ~ is? Searching the net resulted in frustration.<br /><br />
I kind of think it is some kind of equality constraint but can’t find documentation. Perhaps if I knew what it was called I might succeed in finding something. If it is an equality constraint, please provide a reference if you have one. I did not find anything in a search including GHC, etc.<br /><br />
Thanks<br />
_______________________________________________<br />
Haskell-Cafe mailing list<br /><a href="mailto:Haskell-Cafe@haskell.org">Haskell-Cafe@haskell.org</a><br /><a href="http://mail.haskell.org/cgi-bin/mailman/listinfo/haskell-cafe">http://mail.haskell.org/cgi-bin/mailman/listinfo/haskell-cafe</a><br /></blockquote>
</div>


</blockquote></div></body></html>