<div dir="ltr"><div class="gmail_default" style="font-family:tahoma,sans-serif">That looks strange. I would just blaze ahead and do what seems sensible. <br></div><div class="gmail_default" style="font-family:tahoma,sans-serif"><br></div><div class="gmail_default" style="font-family:tahoma,sans-serif">That (Just _) equation was introduced by Daniel Winorgrad-Cort in the commit below. You could try to see what that commit did, I suppose. (Twelve years ago.)</div><div class="gmail_default" style="font-family:tahoma,sans-serif"><br></div><div class="gmail_default" style="font-family:tahoma,sans-serif">Arrows are sadly un-loved (need a champion) so I think you'll just have to do your best.</div><div class="gmail_default" style="font-family:tahoma,sans-serif"><br></div><div class="gmail_default" style="font-family:tahoma,sans-serif">Simon</div><div class="gmail_default" style="font-family:tahoma,sans-serif"><br></div><div class="gmail_default" style="font-family:tahoma,sans-serif"><br></div><div class="gmail_default" style="font-family:tahoma,sans-serif"><br></div><div class="gmail_default" style="font-family:tahoma,sans-serif"><b>commit ba56d20d767f0425f6f7515fa9c78b186589b896</b><br>Author: Simon Peyton Jones <<a href="mailto:simonpj@microsoft.com">simonpj@microsoft.com</a>><br>Date: Wed Oct 3 11:16:22 2012 +0100<br><br> This big patch re-factors the way in which arrow-syntax is handled<br> <br> All the work was done by Dan Winograd-Cort.<br> <br> The main thing is that arrow comamnds now have their own<br> data type HsCmd (defined in HsExpr). Previously it was<br> punned with the HsExpr type, which was jolly confusing,<br> and made it hard to do anything arrow-specific.<br> <br> To make this work, we now parameterise<br> * MatchGroup<br> * Match<br> * GRHSs, GRHS<br> * StmtLR and friends<br> over the "body", that is the kind of thing they<br> enclose. This "body" parameter can be instantiated to<br> either LHsExpr or LHsCmd respectively.<br> <br> Everything else is really a knock-on effect; there should<br> be no change (yet!) in behaviour. But it should be a sounder<br> basis for fixing bugs.<br></div></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Thu, 20 Jun 2024 at 19:51, Alan & Kim Zimmerman <<a href="mailto:alan.zimm@gmail.com">alan.zimm@gmail.com</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div dir="ltr"><div>We are currently wrapping up <a href="https://gitlab.haskell.org/ghc/ghc/-/merge_requests/12842" target="_blank">https://gitlab.haskell.org/ghc/ghc/-/merge_requests/12842</a>, which moves Fixity declarations into TTG extensions point, and into the haskell syntax, not GHC.</div><div><br></div><div>But <span style="font-family:monospace">rnCmd</span> for <span style="font-family:monospace">HsCommandArrForm</span> in current master has</div><div><font size="2"><br></font></div><div><font size="2"><span style="font-family:monospace">rnCmd (HsCmdArrForm _ op _ (Just _) [arg1, arg2])</span></font></div><div><font size="2"><span style="font-family:monospace"> ...<br></span></font></div><div><br></div><div>It matches on <span style="font-family:monospace">HsCmd GhcPs</span>, which never introduce the `Just` form for fixity.</div><div><br></div><div>The only place the `Just` form is introduced, is in <span style="font-family:monospace">mkOpFormRn,</span><span style="font-family:arial,sans-serif"> but this is only ever called from this specific equation. So both can be removed, without changing behaviour.</span></div><div><span style="font-family:arial,sans-serif"><br></span></div><div><span style="font-family:arial,sans-serif">The question is, this code was added for a reason at some point, what has broken in the meantime? Should this be fixed somehow instead of being removed?</span></div><div><span style="font-family:arial,sans-serif"><br></span></div><div><span style="font-family:arial,sans-serif">Alan<br></span></div></div>
_______________________________________________<br>
ghc-devs mailing list<br>
<a href="mailto:ghc-devs@haskell.org" target="_blank">ghc-devs@haskell.org</a><br>
<a href="http://mail.haskell.org/cgi-bin/mailman/listinfo/ghc-devs" rel="noreferrer" target="_blank">http://mail.haskell.org/cgi-bin/mailman/listinfo/ghc-devs</a><br>
</blockquote></div>