<div dir="ltr">Of course not. What a silly thing to suggest. <span style="font-size:13.1999998092651px;line-height:19.7999992370605px">I'm saying that parsing is not relevant to the behavior of ($). The parser can't tell the *semantic* difference between $ and any other operator.</span></div><br><div class="gmail_quote"><div dir="ltr">On Mon, Jun 8, 2015 at 11:02 AM Mike Meyer <<a href="mailto:mwm@mired.org">mwm@mired.org</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr">Are you saying that GHC doesn't have a haskell parser?</div><div dir="ltr"><br><div class="gmail_extra"><br><div class="gmail_quote">On Mon, Jun 8, 2015 at 12:06 PM, Rein Henrichs <span dir="ltr"><<a href="mailto:rein.henrichs@gmail.com" target="_blank">rein.henrichs@gmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr">The point is that there is no parsing happening here. Just evaluation.<br></div><br><div class="gmail_quote"><div dir="ltr">On Mon, Jun 8, 2015 at 3:20 AM Mike Meyer <<a href="mailto:mwm@mired.org" target="_blank">mwm@mired.org</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><p dir="ltr"><br>
On Jun 8, 2015 05:01, "Martin Vlk" <<a href="mailto:martin@vlkk.cz" target="_blank">martin@vlkk.cz</a>> wrote:<br>
><br>
> Mike Meyer:<br>
> > s mp $ n - 1 parses as s mp (n - 1)<br>
> > s mp n - 1 parses as (s mp n) - 1<br>
><br>
><br>
> Hi, I think it is misleading to say that $ "parses" to something.</p>
<p dir="ltr">Which is why I didn't say such a thing. The two sentences show how the expressions he was having trouble with are parsed.  </p>
<p dir="ltr">> ($) is an infix operator with type:<br>
><br>
> ($) :: (a -> b) -> a -> b       -- Defined in ‘GHC.Base’<br>
> infixr 0 $<br>
><br>
> So what it does is it takes a function on the left hand side and applies<br>
> it to the second argument on the right hand side. The trick is it has<br>
> the lowest possible precedence value (0) so everything on the right hand<br>
> side will be evaluated before applying the function on the left.</p>
<p dir="ltr">Which explains why the expression containing a $ parses as it does, which is also useful information.</p>
_______________________________________________<br>
Beginners mailing list<br>
<a href="mailto:Beginners@haskell.org" target="_blank">Beginners@haskell.org</a><br>
<a href="http://mail.haskell.org/cgi-bin/mailman/listinfo/beginners" target="_blank">http://mail.haskell.org/cgi-bin/mailman/listinfo/beginners</a><br>
</blockquote></div>
<br>_______________________________________________<br>
Beginners mailing list<br>
<a href="mailto:Beginners@haskell.org" target="_blank">Beginners@haskell.org</a><br>
<a href="http://mail.haskell.org/cgi-bin/mailman/listinfo/beginners" target="_blank">http://mail.haskell.org/cgi-bin/mailman/listinfo/beginners</a><br>
<br></blockquote></div><br></div></div>
_______________________________________________<br>
Beginners mailing list<br>
<a href="mailto:Beginners@haskell.org" target="_blank">Beginners@haskell.org</a><br>
<a href="http://mail.haskell.org/cgi-bin/mailman/listinfo/beginners" target="_blank">http://mail.haskell.org/cgi-bin/mailman/listinfo/beginners</a><br>
</blockquote></div>