@@ -238,7 +238,6 @@ import Data.ByteString (ByteString)
238238import qualified Data.Text.Lazy as L
239239import Data.Int (Int64)
240240#endif
241−import GHC.Base (eqInt, neInt, gtInt, geInt, ltInt, leInt)
242241#if __GLASGOW_HASKELL__ >= 708
243242import qualified GHC.Exts as Exts
244243#endif
@@ -572,9 +571,7 @@ isSingleton = S.isSingleton . stream
572571-- Subject to fusion.
573572length :: Text -> Int
574573length t = S.length (stream t)
575−{-# INLINE [0] length #-}
576−-- length needs to be phased after the compareN/length rules otherwise
577−-- it may inline before the rules have an opportunity to fire.
574+{-# INLINE length #-}
578575
579576-- | /O(n)/ Compare the count of characters in a 'Text' to a number.
580577-- Subject to fusion.
@@ -593,32 +590,32 @@ compareLength t n = S.compareLengthI (stream t) n
593590
594591{-# RULES
595592"TEXT ==N/length -> compareLength/==EQ" [~1] forall t n.
596− eqInt (length t) n = compareLength t n == EQ
593+ (==) (length t) n = compareLength t n == EQ
597594 #-}
598595
599596{-# RULES
600597"TEXT /=N/length -> compareLength//=EQ" [~1] forall t n.
601− neInt (length t) n = compareLength t n /= EQ
598+ (/=) (length t) n = compareLength t n /= EQ
602599 #-}
603600
604601{-# RULES
605602"TEXT <N/length -> compareLength/==LT" [~1] forall t n.
606− ltInt (length t) n = compareLength t n == LT
603+ (<) (length t) n = compareLength t n == LT
607604 #-}
608605
609606{-# RULES
610607"TEXT <=N/length -> compareLength//=GT" [~1] forall t n.
611− leInt (length t) n = compareLength t n /= GT
608+ (<=) (length t) n = compareLength t n /= GT
612609 #-}
613610
614611{-# RULES
615612"TEXT >N/length -> compareLength/==GT" [~1] forall t n.
616− gtInt (length t) n = compareLength t n == GT
613+ (>) (length t) n = compareLength t n == GT
617614 #-}
618615
619616{-# RULES
620617"TEXT >=N/length -> compareLength//=LT" [~1] forall t n.
621− geInt (length t) n = compareLength t n /= LT
618+ (>=) (length t) n = compareLength t n /= LT
622619 #-}
623620
624621-- -----------------------------------------------------------------------------