[Git][ghc/ghc][wip/sand-witch/types-in-terms] Just a temporary change to fix #25103

Andrei Borzenkov (@sand-witch) gitlab at gitlab.haskell.org
Thu Jul 25 12:55:48 UTC 2024



Andrei Borzenkov pushed to branch wip/sand-witch/types-in-terms at Glasgow Haskell Compiler / GHC


Commits:
3aa6107b by Andrei Borzenkov at 2024-07-25T16:55:27+04:00
Just a temporary change to fix #25103

- - - - -


2 changed files:

- compiler/GHC/Parser.y
- compiler/GHC/Parser/PostProcess.hs


Changes:

=====================================
compiler/GHC/Parser.y
=====================================
@@ -2804,8 +2804,7 @@ infixexp2 :: { ECP }
 
         -- View patterns and function arrows
         | infixexp '->' infixexp2
-                                { ECP $
-                                  withArrowTag $ \tag ->
+                                { withArrowTag $ \tag ->
                                   unECP $1 >>= \ $1 ->
                                   unECP $3 >>= \ $3 ->
                                   let arr = HsUnrestrictedArrow (epUniTok $2)


=====================================
compiler/GHC/Parser/PostProcess.hs
=====================================
@@ -2112,8 +2112,8 @@ nukeArrowTag tag k = case tag of
   ViewPatTag -> k
   FunArrTag -> k
 
-withArrowTag :: DisambECP b => (forall lhs. DisambECP lhs => ArrowTag lhs b -> PV r) -> PV r
-withArrowTag cont = do
+withArrowTag :: (forall lhs b. (DisambECP lhs, DisambECP b) => ArrowTag lhs b -> PV (LocatedA b)) -> ECP
+withArrowTag cont = ECP $ do
   vpEnabled <- getBit ViewPatternsBit
   rtaEnabled <- getBit RequiredTypeArgumentsBit
   if | vpEnabled  -> cont ViewPatTag



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

-- 
View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/commit/3aa6107baf7976b4c13f525e9541d83ca5dbec69
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/20240725/9c917cc1/attachment-0001.html>


More information about the ghc-commits mailing list