[Git][ghc/ghc][wip/T25623] Fix for alex-3.5.2
Brandon Chinn (@brandonchinn178)
gitlab at gitlab.haskell.org
Wed Jan 15 01:38:53 UTC 2025
Brandon Chinn pushed to branch wip/T25623 at Glasgow Haskell Compiler / GHC
Commits:
dd942479 by Brandon Chinn at 2025-01-14T17:38:44-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/dd942479a0a13cb8745061c35bff19a28da05fa7
--
View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/commit/dd942479a0a13cb8745061c35bff19a28da05fa7
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/20250114/33a9cbd7/attachment-0001.html>
More information about the ghc-commits
mailing list