summaryrefslogtreecommitdiff
path: root/libraries/base/GHC/Arr.hs
diff options
context:
space:
mode:
authorSimon Peyton Jones <simonpj@microsoft.com>2021-11-19 18:34:11 +0000
committerMarge Bot <ben+marge-bot@smart-cactus.org>2021-11-22 11:53:02 -0500
commitf0bac29baea62e7e1cd1a2659107cc7c029c9165 (patch)
tree30ddad5e022910bcc8140ed0b4b953b9eda90a37 /libraries/base/GHC/Arr.hs
parentf748988bbea1442b898ba107653216543a293b4d (diff)
downloadhaskell-f0bac29baea62e7e1cd1a2659107cc7c029c9165.tar.gz
Make INLINE/NOINLINE pragmas a bgi less constraining
We can inline a bit earlier than the previous pragmas said. I think they dated from an era in which the InitialPhase did no inlining. I don't think this patch will have much effect, but it's a bit cleaner.
Diffstat (limited to 'libraries/base/GHC/Arr.hs')
-rw-r--r--libraries/base/GHC/Arr.hs3
1 files changed, 2 insertions, 1 deletions
diff --git a/libraries/base/GHC/Arr.hs b/libraries/base/GHC/Arr.hs
index 06951d3851..63d79237c5 100644
--- a/libraries/base/GHC/Arr.hs
+++ b/libraries/base/GHC/Arr.hs
@@ -497,7 +497,8 @@ eqArray arr1@(Array l1 u1 n1 _) arr2@(Array l2 u2 n2 _) =
l1 == l2 && u1 == u2 &&
and [unsafeAt arr1 i == unsafeAt arr2 i | i <- [0 .. n1 - 1]]
-{-# INLINE [1] cmpArray #-}
+{-# INLINE [2] cmpArray #-}
+-- See Note [Allow time for type-specialisation rules to fire] in GHC.Real
cmpArray :: (Ix i, Ord e) => Array i e -> Array i e -> Ordering
cmpArray arr1 arr2 = compare (assocs arr1) (assocs arr2)