Skip to content

Commit

Permalink
added since 1.0.21.0 for strict vector instances
Browse files Browse the repository at this point in the history
  • Loading branch information
BebeSparkelSparkel committed Nov 27, 2024
1 parent b2dba2d commit e2ffa34
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 0 deletions.
6 changes: 6 additions & 0 deletions mono-traversable/src/Data/MonoTraversable.hs
Original file line number Diff line number Diff line change
Expand Up @@ -166,6 +166,7 @@ type instance Element (Product f g a) = a
type instance Element (U.Vector a) = a
type instance Element (VS.Vector a) = a
#if MIN_VERSION_vector(0,13,2)
-- | @since 1.0.21.0
type instance Element (VSC.Vector a) = a
#endif
type instance Element (Arg a b) = b
Expand Down Expand Up @@ -268,6 +269,7 @@ instance VS.Storable a => MonoFunctor (VS.Vector a) where
omap = VS.map
{-# INLINE omap #-}
#if MIN_VERSION_vector(0,13,2)
-- | @since 1.0.21.0
instance MonoFunctor (VSC.Vector a)
#endif
-- | @since 1.0.20.0
Expand Down Expand Up @@ -778,6 +780,7 @@ instance VS.Storable a => MonoFoldable (VS.Vector a) where
{-# INLINE maximumByEx #-}
{-# INLINE minimumByEx #-}
#if MIN_VERSION_vector(0,13,2)
-- | @since 1.0.21.0
instance MonoFoldable (VSC.Vector a) where
ofoldr = VSC.foldr
ofoldl' = VSC.foldl'
Expand Down Expand Up @@ -1106,6 +1109,7 @@ instance VS.Storable a => MonoTraversable (VS.Vector a) where
{-# INLINE otraverse #-}
{-# INLINE omapM #-}
#if MIN_VERSION_vector(0,13,2)
-- | @since 1.0.21.0
instance MonoTraversable (VSC.Vector a)
#endif
instance MonoTraversable (Either a b) where
Expand Down Expand Up @@ -1276,6 +1280,7 @@ instance VS.Storable a => MonoPointed (VS.Vector a) where
opoint = VS.singleton
{-# INLINE opoint #-}
#if MIN_VERSION_vector(0,13,2)
-- | @since 1.0.21.0
instance MonoPointed (VSC.Vector a)
#endif
instance MonoPointed (Either a b) where
Expand Down Expand Up @@ -1389,6 +1394,7 @@ instance GrowingAppend (V.Vector a)
instance U.Unbox a => GrowingAppend (U.Vector a)
instance VS.Storable a => GrowingAppend (VS.Vector a)
#if MIN_VERSION_vector(0,13,2)
-- | @since 1.0.21.0
instance GrowingAppend (VSC.Vector a)
#endif
instance GrowingAppend S.ByteString
Expand Down
2 changes: 2 additions & 0 deletions mono-traversable/src/Data/Sequences.hs
Original file line number Diff line number Diff line change
Expand Up @@ -1102,6 +1102,7 @@ instance IsSequence (V.Vector a) where
{-# INLINE unsafeIndex #-}

#if MIN_VERSION_vector(0,13,2)
-- | @since 1.0.21.0
instance SemiSequence (VSC.Vector a) where
type Index (VSC.Vector a) = Int
reverse = VSC.reverse
Expand All @@ -1118,6 +1119,7 @@ instance SemiSequence (VSC.Vector a) where
{-# INLINE cons #-}
{-# INLINE snoc #-}

-- | @since 1.0.21.0
instance IsSequence (VSC.Vector a) where
fromList = VSC.fromList
lengthIndex = VSC.length
Expand Down

0 comments on commit e2ffa34

Please sign in to comment.