diff options
Diffstat (limited to 'libraries')
-rw-r--r-- | libraries/base/Data/Foldable.hs | 2 | ||||
-rw-r--r-- | libraries/base/GHC/Base.hs | 4 | ||||
-rw-r--r-- | libraries/base/GHC/Real.hs | 2 | ||||
-rw-r--r-- | libraries/ghc-prim/GHC/CString.hs | 8 |
4 files changed, 8 insertions, 8 deletions
diff --git a/libraries/base/Data/Foldable.hs b/libraries/base/Data/Foldable.hs index 82bb3d9077..3624a36b15 100644 --- a/libraries/base/Data/Foldable.hs +++ b/libraries/base/Data/Foldable.hs @@ -740,7 +740,7 @@ Now we get Notice that `f` does not inline into the RHS of `c`, because the INLINE pragma stops it; see -Note [Simplifying inside stable unfoldings] in SimplUtils. +Note [Simplifying inside stable unfoldings] in GHC.Core.Op.Simplify.Utils. Continuing: = { foldr/build rule } diff --git a/libraries/base/GHC/Base.hs b/libraries/base/GHC/Base.hs index 65ec3ea1b7..498964b86d 100644 --- a/libraries/base/GHC/Base.hs +++ b/libraries/base/GHC/Base.hs @@ -1358,7 +1358,7 @@ eqString (c1:cs1) (c2:cs2) = c1 == c2 && cs1 `eqString` cs2 eqString _ _ = False {-# RULES "eqString" (==) = eqString #-} --- eqString also has a BuiltInRule in PrelRules.hs: +-- eqString also has a BuiltInRule in GHC.Core.Op.ConstantFold: -- eqString (unpackCString# (Lit s1)) (unpackCString# (Lit s2)) = s1==s2 @@ -1624,7 +1624,7 @@ a `iShiftRL#` b | isTrue# (b >=# WORD_SIZE_IN_BITS#) = 0# "unpack-list" [1] forall a . unpackFoldrCString# a (:) [] = unpackCString# a "unpack-append" forall a n . unpackFoldrCString# a (:) n = unpackAppendCString# a n --- There's a built-in rule (in PrelRules.hs) for +-- There's a built-in rule (in GHC.Core.Op.ConstantFold) for -- unpackFoldr "foo" c (unpackFoldr "baz" c n) = unpackFoldr "foobaz" c n #-} diff --git a/libraries/base/GHC/Real.hs b/libraries/base/GHC/Real.hs index b0f419896d..295b0131bb 100644 --- a/libraries/base/GHC/Real.hs +++ b/libraries/base/GHC/Real.hs @@ -417,7 +417,7 @@ instance Real Natural where -- -- Constant folding of quot, rem, div, mod, divMod and quotRem for -- Integer arguments depends crucially on inlining. Constant folding --- rules defined in compiler/prelude/PrelRules.hs trigger for +-- rules defined in GHC.Core.Op.ConstantFold trigger for -- quotInteger, remInteger and so on. So if calls to quot, rem and so on -- were not inlined the rules would not fire. The rules would also not -- fire if calls to quotInteger and so on were inlined, but this does not diff --git a/libraries/ghc-prim/GHC/CString.hs b/libraries/ghc-prim/GHC/CString.hs index 5c9dcf95db..3ae4d50532 100644 --- a/libraries/ghc-prim/GHC/CString.hs +++ b/libraries/ghc-prim/GHC/CString.hs @@ -46,7 +46,7 @@ is a waste. Moreover, inlining early may interfere with a variety of rules that are supposed to match unpackCString#, - * BuiltInRules in PrelRules.hs; e.g. + * BuiltInRules in GHC.Core.Op.ConstantFold; e.g. eqString (unpackCString# (Lit s1)) (unpackCString# (Lit s2) = s1 == s2 @@ -60,8 +60,8 @@ to match unpackCString#, Moreover, we want to make it CONLIKE, so that: -* the rules in PrelRules will fire when the string is let-bound. - E.g. the eqString rule in PrelRules +* the rules in GHC.Core.Op.ConstantFold will fire when the string is let-bound. + E.g. the eqString rule in GHC.Core.Op.ConstantFold eqString (unpackCString# (Lit s1)) (unpackCString# (Lit s2) = s1==s2 * exprIsConApp_maybe will see the string when we have @@ -115,7 +115,7 @@ unpackFoldrCString# :: Addr# -> (Char -> a -> a) -> a -> a -- Usually the unpack-list rule turns unpackFoldrCString# into unpackCString# --- It also has a BuiltInRule in PrelRules.hs: +-- It also has a BuiltInRule in GHC.Core.Op.ConstantFold: -- unpackFoldrCString# "foo" c (unpackFoldrCString# "baz" c n) -- = unpackFoldrCString# "foobaz" c n |