The question is, is there some very important reason you can&#39;t do this?<div><br></div><div>firstCoord (P x _) = x<br><br><div class="gmail_quote">2009/3/9 Peter Verswyvelen <span dir="ltr">&lt;<a href="mailto:bugfact@gmail.com">bugfact@gmail.com</a>&gt;</span><br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;">In Haskell, a data constructor can be used partially applied:<div><br></div><div>data Pair a b = P a b</div><div><br></div>
<div>f = P 1</div><div><br></div><div>however, I cannot do &quot;partial pattern matching&quot;, e.g</div>
<div><br></div><div>firstCoord (P x) = x</div><div><br></div><div>does not work.</div><div><br></div><div>I guess a very important reason must exist why this is the case?</div><div><br></div><div><br></div><div><br></div>

<div><br></div><div><br></div>
<br>_______________________________________________<br>
Haskell-Cafe mailing list<br>
<a href="mailto:Haskell-Cafe@haskell.org">Haskell-Cafe@haskell.org</a><br>
<a href="http://www.haskell.org/mailman/listinfo/haskell-cafe" target="_blank">http://www.haskell.org/mailman/listinfo/haskell-cafe</a><br>
<br></blockquote></div><br></div>