Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Enabled native groupBy for vector #252

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions mono-traversable/ChangeLog.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,10 @@
# ChangeLog for mono-traversable

## 1.0.21.1

* Enabled native `groupBy` for Vector, U.Vector, VS.Vector since they have been available since vector-0.13.0.0
[#251](https://github.com/snoyberg/mono-traversable/issues/251)

## 1.0.21.0

* Support for vector 0.13.2.0, adding instances for [`Data.Vector.Strict`](https://hackage.haskell.org/package/vector-0.13.2.0/docs/Data-Vector-Strict.html) data structure.
Expand Down
2 changes: 1 addition & 1 deletion mono-traversable/mono-traversable.cabal
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ cabal-version: 1.12
-- see: https://github.com/sol/hpack

name: mono-traversable
version: 1.0.21.0
version: 1.0.21.1
synopsis: Type classes for mapping, folding, and traversing monomorphic containers
description: Please see the README at <https://www.stackage.org/package/mono-traversable>
category: Data
Expand Down
2 changes: 1 addition & 1 deletion mono-traversable/package.yaml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
name: mono-traversable
version: 1.0.21.0
version: 1.0.21.1
synopsis: Type classes for mapping, folding, and traversing monomorphic containers
description: Please see the README at <https://www.stackage.org/package/mono-traversable>
category: Data
Expand Down
18 changes: 15 additions & 3 deletions mono-traversable/src/Data/Sequences.hs
Original file line number Diff line number Diff line change
Expand Up @@ -1067,7 +1067,11 @@ instance IsSequence (V.Vector a) where
unsnoc v
| V.null v = Nothing
| otherwise = Just (V.init v, V.last v)
--groupBy = V.groupBy
#if MIN_VERSION_vector(0,13,0)
-- | since 1.0.21.1
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@since instead of since.

groupBy = V.groupBy
{-# INLINE groupBy #-}
#endif
tailEx = V.tail
initEx = V.init
unsafeTail = V.unsafeTail
Expand Down Expand Up @@ -1218,7 +1222,11 @@ instance U.Unbox a => IsSequence (U.Vector a) where
unsnoc v
| U.null v = Nothing
| otherwise = Just (U.init v, U.last v)
--groupBy = U.groupBy
#if MIN_VERSION_vector(0,13,0)
-- | since 1.0.21.1
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think you mean @since. There are a few instances of this.

groupBy = U.groupBy
{-# INLINE groupBy #-}
#endif
tailEx = U.tail
initEx = U.init
unsafeTail = U.unsafeTail
Expand Down Expand Up @@ -1291,7 +1299,11 @@ instance VS.Storable a => IsSequence (VS.Vector a) where
unsnoc v
| VS.null v = Nothing
| otherwise = Just (VS.init v, VS.last v)
--groupBy = U.groupBy
#if MIN_VERSION_vector(0,13,0)
-- | since 1.0.21.1
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@since instead of since.

groupBy = VS.groupBy
{-# INLINE groupBy #-}
#endif
tailEx = VS.tail
initEx = VS.init
unsafeTail = VS.unsafeTail
Expand Down
Loading