diff options
author | Sylvain Henry <sylvain@haskus.fr> | 2020-03-17 09:45:29 +0100 |
---|---|---|
committer | Marge Bot <ben+marge-bot@smart-cactus.org> | 2020-03-18 10:06:43 -0400 |
commit | 528df8ecb4e2f9c78b1ae4ab7ff8230644e9b643 (patch) | |
tree | 86cd4522d35c4c8fd3a17db5f4e6b138f8be70df /libraries/base | |
parent | 53ff2cd0c49735e8f709ac8a5ceab68483eb89df (diff) | |
download | haskell-528df8ecb4e2f9c78b1ae4ab7ff8230644e9b643.tar.gz |
Modules: Core operations (#13009)
Diffstat (limited to 'libraries/base')
-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 |
3 files changed, 4 insertions, 4 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 |