Skip to content

Commit 8865b01

Browse files
committed
Try to fix for old GHC
1 parent 9399062 commit 8865b01

File tree

1 file changed

+9
-0
lines changed
  • containers/src/Data/Sequence/Internal

1 file changed

+9
-0
lines changed

containers/src/Data/Sequence/Internal/Depth.hs

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
{-# LANGUAGE CPP #-}
12
{-# LANGUAGE GADTs #-}
23
{-# LANGUAGE KindSignatures #-}
34
{-# LANGUAGE PatternSynonyms #-}
@@ -83,7 +84,11 @@ data CheckedBottom node a t where
8384
checkBottom :: Depth_ node a t -> CheckedBottom node a t
8485
checkBottom (Depth_ 0) = unsafeCoerce AtBottom
8586
checkBottom (Depth_ d) = unsafeCoerce (NotBottom (Depth_ (d - 1)))
87+
#if MIN_VERSION_GLASGOW_HASKELL(9,2,0,0)
8688
{-# INLINE checkBottom #-}
89+
#else
90+
{-# NOINLINE checkBottom #-}
91+
#endif
8792

8893

8994
-- | A version of 'Depth_' for implementing traversals. Conceptually,
@@ -122,4 +127,8 @@ data CheckedBottom2 node a t b u where
122127
checkBottom2 :: Depth2_ node a t b u -> CheckedBottom2 node a t b u
123128
checkBottom2 (Depth2_ 0) = unsafeCoerce AtBottom2
124129
checkBottom2 (Depth2_ d) = unsafeCoerce (NotBottom2 (Depth2_ (d - 1)))
130+
#if MIN_VERSION_GLASGOW_HASKELL(9,2,0,0)
125131
{-# INLINE checkBottom2 #-}
132+
#else
133+
{-# NOINLINE checkBottom2 #-}
134+
#endif

0 commit comments

Comments
 (0)