[Git][ghc/ghc][wip/kirchner/ttg-zurich] Fix failing test

Alan Zimmerman (@alanz) gitlab at gitlab.haskell.org
Mon Jun 17 20:12:21 UTC 2024



Alan Zimmerman pushed to branch wip/kirchner/ttg-zurich at Glasgow Haskell Compiler / GHC


Commits:
e212f755 by Alan Zimmerman at 2024-06-17T21:12:10+01:00
Fix failing test

T20846 failed for printing prefix, not infix.

ppr for HsCmdArrForm uses lexical fixity for the GhcPs case

- - - - -


2 changed files:

- compiler/GHC/Hs/Expr.hs
- compiler/GHC/Types/Fixity.hs


Changes:

=====================================
compiler/GHC/Hs/Expr.hs
=====================================
@@ -1428,7 +1428,7 @@ ppr_cmd (HsCmdArrForm rn_fix (L _ op) ps_fix args)
     ppr_cmd_infix v
       | [arg1, arg2] <- args
       , case ghcPass @p of
-          GhcPs -> False
+          GhcPs -> ps_fix == Infix
           GhcRn -> isJust rn_fix || ps_fix == Infix
           GhcTc -> isJust rn_fix || ps_fix == Infix
       = hang (pprCmdArg (unLoc arg1))


=====================================
compiler/GHC/Types/Fixity.hs
=====================================
@@ -32,9 +32,6 @@ import Data.Data hiding (Fixity(..))
 import Language.Haskell.Syntax.Extension
 import Language.Haskell.Syntax.Basic (FixityDirection(..), LexicalFixity(..))
 
--- type instance XFixity (GhcPass _) = NoExtField
--- type instance XXFixity (GhcPass _) = DataConCantHappen
-
 -- | Fixity used internally in GHC, so that we don't have to take `GhcPass p`
 -- everywhere.
 --



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

-- 
View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/commit/e212f755a344474b23ea8d17cc2665cf937fed5a
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/20240617/1376a651/attachment-0001.html>


More information about the ghc-commits mailing list