[commit: ghc] wip/T14068: Mark `eqString` as `NOINLINE` (32838c6)
git at git.haskell.org
git at git.haskell.org
Tue Oct 31 03:34:55 UTC 2017
Repository : ssh://git@git.haskell.org/ghc
On branch : wip/T14068
Link : http://ghc.haskell.org/trac/ghc/changeset/32838c6c148072a2864f5fba47f61fe4528759cd/ghc
>---------------------------------------------------------------
commit 32838c6c148072a2864f5fba47f61fe4528759cd
Author: Joachim Breitner <mail at joachim-breitner.de>
Date: Wed Aug 2 10:53:37 2017 -0400
Mark `eqString` as `NOINLINE`
so that the built-in rule can still match.
This will be a problem in general: With loopification, recursive
functions can now inline (yay!) but many people out there probably rely
on the fact that recursive functions cannot inline (ouch). Hopefully the
recent warnings in GHC made them fix this before loopification reaches
them.
>---------------------------------------------------------------
32838c6c148072a2864f5fba47f61fe4528759cd
libraries/base/GHC/Base.hs | 1 +
1 file changed, 1 insertion(+)
diff --git a/libraries/base/GHC/Base.hs b/libraries/base/GHC/Base.hs
index 052f13f..0ff4589 100644
--- a/libraries/base/GHC/Base.hs
+++ b/libraries/base/GHC/Base.hs
@@ -1183,6 +1183,7 @@ eqString :: String -> String -> Bool
eqString [] [] = True
eqString (c1:cs1) (c2:cs2) = c1 == c2 && cs1 `eqString` cs2
eqString _ _ = False
+{-# NOINLINE eqString #-}
{-# RULES "eqString" (==) = eqString #-}
-- eqString also has a BuiltInRule in PrelRules.hs:
More information about the ghc-commits
mailing list