That looks strange. I would just blaze ahead and do what seems sensible. 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.) Arrows are sadly un-loved (need a champion) so I think you'll just have to do your best. Simon *commit ba56d20d767f0425f6f7515fa9c78b186589b896* Author: Simon Peyton Jones <simonpj@microsoft.com> Date: Wed Oct 3 11:16:22 2012 +0100 This big patch re-factors the way in which arrow-syntax is handled All the work was done by Dan Winograd-Cort. The main thing is that arrow comamnds now have their own data type HsCmd (defined in HsExpr). Previously it was punned with the HsExpr type, which was jolly confusing, and made it hard to do anything arrow-specific. To make this work, we now parameterise * MatchGroup * Match * GRHSs, GRHS * StmtLR and friends over the "body", that is the kind of thing they enclose. This "body" parameter can be instantiated to either LHsExpr or LHsCmd respectively. Everything else is really a knock-on effect; there should be no change (yet!) in behaviour. But it should be a sounder basis for fixing bugs. On Thu, 20 Jun 2024 at 19:51, Alan & Kim Zimmerman <alan.zimm@gmail.com> wrote:
We are currently wrapping up https://gitlab.haskell.org/ghc/ghc/-/merge_requests/12842, which moves Fixity declarations into TTG extensions point, and into the haskell syntax, not GHC.
But rnCmd for HsCommandArrForm in current master has
rnCmd (HsCmdArrForm _ op _ (Just _) [arg1, arg2]) ...
It matches on HsCmd GhcPs, which never introduce the `Just` form for fixity.
The only place the `Just` form is introduced, is in mkOpFormRn, but this is only ever called from this specific equation. So both can be removed, without changing behaviour.
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?
Alan _______________________________________________ ghc-devs mailing list ghc-devs@haskell.org http://mail.haskell.org/cgi-bin/mailman/listinfo/ghc-devs