[Git][ghc/ghc][wip/az/T25015-hscmdarrform-fixity] HsCmdArrForm: restore infix form

Alan Zimmerman (@alanz) gitlab at gitlab.haskell.org
Sun Jun 23 17:15:21 UTC 2024



Alan Zimmerman pushed to branch wip/az/T25015-hscmdarrform-fixity at Glasgow Haskell Compiler / GHC


Commits:
0a0e6242 by Alan Zimmerman at 2024-06-23T18:14:46+01:00
HsCmdArrForm: restore infix form

Prior to 7d3f2dfc7a45d741224c521e0f2a616a89f9506f we passed on the
fixity value in a Just when converting an OpApp into a HsCmdArrForm, and the
rnCmd looked purely for the presence of the Just to trigger fixity
processing.

Restore this behaviour, by using the LexicalFixity.Infix field to
trigger the rnCmd behaviour.

Closes #25015

- - - - -


1 changed file:

- compiler/GHC/Rename/Expr.hs


Changes:

=====================================
compiler/GHC/Rename/Expr.hs
=====================================
@@ -906,7 +906,7 @@ rnCmd (HsCmdArrApp _ arrow arg ho rtl)
         -- inside 'arrow'.  In the higher-order case (-<<), they are.
 
 -- infix form
-rnCmd (HsCmdArrForm _ op _ (Just _) [arg1, arg2])
+rnCmd (HsCmdArrForm _ op Infix _ [arg1, arg2])
   = do { (op',fv_op) <- escapeArrowScope (rnLExpr op)
        ; let L _ (HsVar _ (L _ op_name)) = op'
        ; (arg1',fv_arg1) <- rnCmdTop arg1



View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/commit/0a0e6242bc375a464bcaafc5951e3475a389b796

-- 
View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/commit/0a0e6242bc375a464bcaafc5951e3475a389b796
You're receiving this email because of your account on gitlab.haskell.org.


-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.haskell.org/pipermail/ghc-commits/attachments/20240623/82eeffa7/attachment-0001.html>


More information about the ghc-commits mailing list