Skip to content

Commit d77b0f5

Browse files
authored
Drop "ifdef GHC"s on INLINABLE pragmas (#1167)
These were added long ago in 06e91ac as an improvement on GHC over the already existing INLINE pragmas. We can get rid of these unnecessary (and confusing to contributors) ifdefs today since we do not have other compilers where we want the non-INLINABLE behavior to apply. While INLINABLE is not a standard pragma listed in the Haskell 2010 report, the report also specifies that unrecognized pragmas should be ignored. So we don't expect this to cause issues for non-GHC compilers. MicroHs quietly ignores them as expected.
1 parent e7b1b72 commit d77b0f5

File tree

7 files changed

+12
-338
lines changed

7 files changed

+12
-338
lines changed

containers/src/Data/IntMap/Internal.hs

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -3391,11 +3391,7 @@ fromSetA f (IntSet.Tip kx bm) = buildTree f kx bm (IntSet.suffixBitMask + 1)
33913391
(Bin (Prefix (prefix .|. bits2)))
33923392
(buildTree g prefix bmask bits2)
33933393
(buildTree g (prefix + bits2) (bmask `shiftRL` bits2) bits2)
3394-
#if __GLASGOW_HASKELL__
33953394
{-# INLINABLE fromSetA #-}
3396-
#else
3397-
{-# INLINE fromSetA #-}
3398-
#endif
33993395

34003396
{--------------------------------------------------------------------
34013397
Lists

containers/src/Data/IntMap/Strict/Internal.hs

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1116,11 +1116,7 @@ fromSetA f (IntSet.Tip kx bm) = buildTree f kx bm (IntSet.suffixBitMask + 1)
11161116
(Bin (Prefix (prefix .|. bits2)))
11171117
(buildTree g prefix bmask bits2)
11181118
(buildTree g (prefix + bits2) (bmask `shiftRL` bits2) bits2)
1119-
#if __GLASGOW_HASKELL__
11201119
{-# INLINABLE fromSetA #-}
1121-
#else
1122-
{-# INLINE fromSetA #-}
1123-
#endif
11241120

11251121
{--------------------------------------------------------------------
11261122
Lists

containers/src/Data/IntSet/Internal.hs

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -618,9 +618,7 @@ alterF f k s = fmap choose (f member_)
618618

619619
choose True = inserted
620620
choose False = deleted
621-
#ifndef __GLASGOW_HASKELL__
622-
{-# INLINE alterF #-}
623-
#else
621+
#ifdef __GLASGOW_HASKELL__
624622
{-# INLINABLE [2] alterF #-}
625623

626624
{-# RULES

0 commit comments

Comments
 (0)