Skip to content

Commit

Permalink
feat: Add vector <0.13.2 deprecation notice and enable groupBy for st…
Browse files Browse the repository at this point in the history
…rict vector

Adds deprecation warnings for vector <0.13.2 support and enables groupBy method for Vector. Changes:
- Add DependencyDeprecation pragma for vector <0.13.2
- Enable V.groupBy implementation that was commented out
- Replace runtime warning with pragma for missing VSC tests
  • Loading branch information
BebeSparkelSparkel committed Nov 27, 2024
1 parent f671b92 commit 3c32418
Show file tree
Hide file tree
Showing 3 changed files with 457 additions and 460 deletions.
3 changes: 3 additions & 0 deletions mono-traversable/src/Data/MonoTraversable.hs
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@
-- instead.\" (Agreed, it's not a great mangling scheme, input is welcome!)
module Data.MonoTraversable where


import Control.Applicative
import Control.Category
import Control.Monad (Monad (..))
Expand Down Expand Up @@ -95,6 +96,8 @@ import qualified Data.Vector.Unboxed as U
import qualified Data.Vector.Storable as VS
#if MIN_VERSION_vector(0,13,2)
import qualified Data.Vector.Strict as VSC
#else
{-# DependencyDeprecation "Support for vector < 0.13.2 will be removed when GHC 9.12 reaches Stackage nightly. Please upgrade to vector >= 0.13.2." #-}
#endif
import qualified Data.IntSet as IntSet
import Data.Semigroup
Expand Down
4 changes: 3 additions & 1 deletion mono-traversable/src/Data/Sequences.hs
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,8 @@ import qualified Data.Vector.Unboxed as U
import qualified Data.Vector.Storable as VS
#if MIN_VERSION_vector(0,13,2)
import qualified Data.Vector.Strict as VSC
#else
{-# DependencyDeprecation "Support for vector < 0.13.2 will be removed when GHC 9.12 reaches Stackage nightly. Please upgrade to vector >= 0.13.2." #-}
#endif
import Data.String (IsString)
import qualified Data.List.NonEmpty as NE
Expand Down Expand Up @@ -1139,7 +1141,7 @@ instance IsSequence (VSC.Vector a) where
unsnoc v
| VSC.null v = Nothing
| otherwise = Just (VSC.init v, VSC.last v)
--groupBy = VSC.groupBy
groupBy = VSC.groupBy
tailEx = VSC.tail
initEx = VSC.init
unsafeTail = VSC.unsafeTail
Expand Down
Loading

0 comments on commit 3c32418

Please sign in to comment.