<div dir="ltr">Can be added to Nitpicks then :) :<br><br>  https://wiki.haskell.org/Nitpicks<br><br>Alexey.<br><br>On Sunday, February 26, 2017 at 12:25:17 AM UTC+1, David Feuer wrote:<blockquote class="gmail_quote" style="margin: 0;margin-left: 0.8ex;border-left: 1px #ccc solid;padding-left: 1ex;"><div dir="auto">I firmly believe that making pattern matches in let and where clauses lazy by default was a mistake in the Haskell Report. It's inconsistent with how pattern matching works elsewhere in the language, and also makes a strange distinction between outer and inner pattern matches. Unfortunately, it's way too late to fix that mistake.</div><div><br><div class="gmail_quote">On Feb 24, 2017 12:09 AM, "Harendra Kumar" <<a href="javascript:" target="_blank" gdf-obfuscated-mailto="S8DkuPHeAAAJ" rel="nofollow" onmousedown="this.href='javascript:';return true;" onclick="this.href='javascript:';return true;">harendr...@gmail.com</a>> wrote:<br type="attribution"><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr">CCing the list. I guess you intended to cc but forgot.<div><br><div><div class="gmail_quote">On 24 February 2017 at 09:27,  <span dir="ltr"><<a href="javascript:" target="_blank" gdf-obfuscated-mailto="S8DkuPHeAAAJ" rel="nofollow" onmousedown="this.href='javascript:';return true;" onclick="this.href='javascript:';return true;">o...@cs.otago.ac.nz</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">In Erlang, the equivalent of a let fails.<br>
1> 1=2.<br>
** exception error: no match of right hand side value 2<br>
<br>
In SML, the equivalent of a let fails.<br>
- val 1 = 1;<br>
- val 1 = 2;<br>
<br>
uncaught exception Bind [nonexhaustive binding failure]<br>
  raised at: stdIn:2.5-2.10<br>
<br>
The problem is not that let 1 = 2 ... is *legal* but that<br>
- the compiler is  *silent* about it<br>
- the runtime is *silent* about it.<br>
Compiling the little program<br>
<br>
  main = let 1 = 2 in print "hi"<br>
<br>
I expected that the compiler would be silent but that<br>
there would be some sort of "matched failed" error at<br>
run time.  Silly me.<br>
<br>
<br>
The thing is, it is not just bindings that bind no variables<br>
that act as if they were not there.<br>
<br>
  main = let [x] = [1,2] in print "hi"<br>
<br>
also compiles silently and runs without error.  Change it to<br>
<br>
  main = let [x] = [1,2] in print ("hi" ++ show x)<br>
<br>
and you get a runtime error<br>
<br>
<object>: <source>: Irrefutable pattern failed for pattern [x].<br>
<br>
I wish the compiler would report an error something like<br>
<br>
"<location>: possibly failing match deleted<br>
             because it binds no live variables"<br>
<br>
<br>
<br>
</blockquote></div><br></div></div></div>
<br>______________________________<wbr>_________________<br>
Haskell-Cafe mailing list<br>
To (un)subscribe, modify options or view archives go to:<br>
<a href="http://mail.haskell.org/cgi-bin/mailman/listinfo/haskell-cafe" rel="nofollow" target="_blank" onmousedown="this.href='http://www.google.com/url?q\x3dhttp%3A%2F%2Fmail.haskell.org%2Fcgi-bin%2Fmailman%2Flistinfo%2Fhaskell-cafe\x26sa\x3dD\x26sntz\x3d1\x26usg\x3dAFQjCNH7sFgl7KfuDcDlaGGG3ip3kRaoIA';return true;" onclick="this.href='http://www.google.com/url?q\x3dhttp%3A%2F%2Fmail.haskell.org%2Fcgi-bin%2Fmailman%2Flistinfo%2Fhaskell-cafe\x26sa\x3dD\x26sntz\x3d1\x26usg\x3dAFQjCNH7sFgl7KfuDcDlaGGG3ip3kRaoIA';return true;">http://mail.haskell.org/cgi-<wbr>bin/mailman/listinfo/haskell-<wbr>cafe</a><br>
Only members subscribed via the mailman list are allowed to post.<br></blockquote></div></div>
</blockquote></div>