@@ -196,11 +196,7 @@ import Data.Bits
196196import qualified Data.List as List
197197import Data.List.NonEmpty (NonEmpty (.. ))
198198import Data.Maybe (fromMaybe )
199- import Data.Semigroup
200- (Semigroup (stimes ), stimesIdempotent , stimesIdempotentMonoid )
201- #if !(MIN_VERSION_base(4,11,0))
202- import Data.Semigroup (Semigroup ((<>) ))
203- #endif
199+ import Data.Semigroup (Semigroup (.. ), stimesIdempotent , stimesIdempotentMonoid )
204200import Utils.Containers.Internal.Prelude hiding
205201 (filter , foldr , foldl , foldl' , foldMap , null , map )
206202import Prelude ()
@@ -224,6 +220,7 @@ import Data.IntSet.Internal.IntTreeCommons
224220import Data.Data (Data (.. ), Constr , mkConstr , constrIndex , DataType , mkDataType )
225221import qualified Data.Data
226222import Text.Read
223+ import Data.Coerce (coerce )
227224#endif
228225
229226#if __GLASGOW_HASKELL__
@@ -687,6 +684,13 @@ instance Semigroup Intersection where
687684 stimes = stimesIdempotent
688685 {-# INLINABLE stimes #-}
689686
687+ sconcat =
688+ #ifdef __GLASGOW_HASKELL__
689+ coerce intersections
690+ #else
691+ Intersection . intersections . fmap getIntersection
692+ #endif
693+
690694{- -------------------------------------------------------------------
691695 Symmetric difference
692696--------------------------------------------------------------------}
0 commit comments