[Git][ghc/ghc][wip/T25623] Fix for alex-3.5.2

Brandon Chinn (@brandonchinn178) gitlab at gitlab.haskell.org
Wed Jan 15 17:29:32 UTC 2025



Brandon Chinn pushed to branch wip/T25623 at Glasgow Haskell Compiler / GHC


Commits:
878974d3 by Brandon Chinn at 2025-01-15T09:29:22-08:00
Fix for alex-3.5.2

- - - - -


1 changed file:

- compiler/GHC/Parser/Lexer.x


Changes:

=====================================
compiler/GHC/Parser/Lexer.x
=====================================
@@ -41,6 +41,7 @@
 -- Alex "Haskell code fragment top"
 
 {
+{-# LANGUAGE CPP #-}
 {-# LANGUAGE ViewPatterns #-}
 {-# LANGUAGE LambdaCase #-}
 {-# LANGUAGE MultiWayIf #-}
@@ -3467,10 +3468,12 @@ topNoLayoutContainsCommas [] = False
 topNoLayoutContainsCommas (ALRLayout _ _ : ls) = topNoLayoutContainsCommas ls
 topNoLayoutContainsCommas (ALRNoLayout b _ : _) = b
 
+#if !MIN_TOOL_VERSION_alex(3,5,2)
 -- If the generated alexScan/alexScanUser functions are called multiple times
 -- in this file, alexScanUser gets broken out into a separate function and
 -- increases memory usage. Make sure GHC inlines this function and optimizes it.
 {-# INLINE alexScanUser #-}
+#endif
 
 lexToken :: P (PsLocated Token)
 lexToken = do



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

-- 
View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/commit/878974d3ba379f346e397cc1871914e6cec6c5ee
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/20250115/68217608/attachment.html>


More information about the ghc-commits mailing list