<div dir="auto">Another way to figure it out is the shift/reduce conflict on @, which tells you it had two ways to recognize it. "Reduce" here means returning to your parser rule, so "shift" means btype wanted to recognize the @. Inspecting btype would then have shown that it was looking for a type application.</div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Sat, Aug 29, 2020, 03:17 Csongor Kiss <<a href="mailto:kiss.csongor.kiss@gmail.com">kiss.csongor.kiss@gmail.com</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div style="word-wrap:break-word;line-break:after-white-space">Thanks a lot Vlad and Shayne, that indeed did the trick!<div><br></div><div>Out of curiosity, how could I have figured out that this was the culprit? The parse</div><div>error I got was a bit puzzling, and I couldn't find any flags that would give more information</div><div>(I think I was looking for the parser equivalent of -ddump-tc-trace).</div><div><br></div><div>Best,</div><div>Csongor<br><div><div><br><blockquote type="cite"><div>On 29 Aug 2020, at 00:51, Shayne Fletcher <<a href="mailto:shayne.fletcher.50@gmail.com" target="_blank" rel="noreferrer">shayne.fletcher.50@gmail.com</a>> wrote:</div><br><div><br><br style="font-family:Helvetica;font-size:12px;font-style:normal;font-variant-caps:normal;font-weight:normal;letter-spacing:normal;text-align:start;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px;text-decoration:none"><div class="gmail_quote" style="font-family:Helvetica;font-size:12px;font-style:normal;font-variant-caps:normal;font-weight:normal;letter-spacing:normal;text-align:start;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px;text-decoration:none"><div dir="ltr" class="gmail_attr">On Fri, Aug 28, 2020 at 7:48 PM Shayne Fletcher <<a href="mailto:shayne.fletcher.50@gmail.com" target="_blank" rel="noreferrer">shayne.fletcher.50@gmail.com</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-style:solid;border-left-color:rgb(204,204,204);padding-left:1ex"><div dir="ltr"><div dir="ltr"><div style="font-family:tahoma,sans-serif"><br></div></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Fri, Aug 28, 2020 at 7:38 PM Vladislav Zavialov <<a href="mailto:vladislav@serokell.io" target="_blank" rel="noreferrer">vladislav@serokell.io</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-style:solid;border-left-color:rgb(204,204,204);padding-left:1ex">Hi Csongor,<br><br>I believe the reason for this failure is that  a -> @m b  gets parsed as  a -> @(m b).<br>Why is that? Because a ‘btype’ includes type-level application.<br><br>If you replace the ‘btype’ after PREFIX_AT with an ‘atype’, this particular issue should go away. At least that’s my hypothesis, I haven’t tested it.<br><br></blockquote><div><br><div style="font-family:tahoma,sans-serif">I confirm that this is correct and with that change the example string reduces as hoped.</div><br><br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-style:solid;border-left-color:rgb(204,204,204);padding-left:1ex">- Vlad<br></blockquote><div></div></div></div></blockquote><div><br><div class="gmail_default" style="font-family:tahoma,sans-serif">Also, with that correction there are no new shift/reduce conflicts. The original rule gave rise to 3.</div></div></div><div style="font-family:Helvetica;font-size:12px;font-style:normal;font-variant-caps:normal;font-weight:normal;letter-spacing:normal;text-align:start;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px;text-decoration:none"><br></div><span style="font-family:Helvetica;font-size:12px;font-style:normal;font-variant-caps:normal;font-weight:normal;letter-spacing:normal;text-align:start;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px;text-decoration:none;float:none;display:inline!important">--<span> </span></span><br style="font-family:Helvetica;font-size:12px;font-style:normal;font-variant-caps:normal;font-weight:normal;letter-spacing:normal;text-align:start;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px;text-decoration:none"><div dir="ltr" style="font-family:Helvetica;font-size:12px;font-style:normal;font-variant-caps:normal;font-weight:normal;letter-spacing:normal;text-align:start;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px;text-decoration:none">Shayne Fletcher</div></div></blockquote></div><br></div></div></div>_______________________________________________<br>
ghc-devs mailing list<br>
<a href="mailto:ghc-devs@haskell.org" target="_blank" rel="noreferrer">ghc-devs@haskell.org</a><br>
<a href="http://mail.haskell.org/cgi-bin/mailman/listinfo/ghc-devs" rel="noreferrer noreferrer" target="_blank">http://mail.haskell.org/cgi-bin/mailman/listinfo/ghc-devs</a><br>
</blockquote></div>