Skip to content

Commit

Permalink
Merge pull request serokell#260 from serokell/dk318/serokell#250-grou…
Browse files Browse the repository at this point in the history
…p-function-reexport

[serokell#250] Reexport `group`-like functions from `Data.List.NonEmpty`
  • Loading branch information
DK318 authored Apr 28, 2022
2 parents b7ed3cb + 73e8a3e commit 4396fa9
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 3 deletions.
3 changes: 3 additions & 0 deletions CHANGES.md
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,9 @@ Unreleased
Change type of `concatMap` from `concatMap :: Foldable f => (a -> [b]) -> t a -> [b]`
to `concatMap :: Container c => (Element c -> [b]) -> c -> [b]`.

* [250](https://github.com/serokell/universum/issues):
Replace `group` export from `Data.List` with `group`, `groupBy`, `groupWith` and `groupAllWith` from `Data.List.NonEmpty`.

1.7.3
=====

Expand Down
2 changes: 1 addition & 1 deletion benchmark/Main.hs
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,7 @@ bgroupList f name = bgroup name $
]

groupSort :: [a] -> [a]
groupSort = map Unsafe.head . group . sort
groupSort = map NonEmpty.head . group . sort

safeSort :: [a] -> [a]
safeSort = map NonEmpty.head . NonEmpty.group . sort
Expand Down
4 changes: 2 additions & 2 deletions src/Universum/List/Reexport.hs
Original file line number Diff line number Diff line change
Expand Up @@ -9,10 +9,10 @@ module Universum.List.Reexport
) where

import Data.List (break, cycle, drop, dropWhile, filter, genericDrop, genericLength,
genericReplicate, genericSplitAt, genericTake, group, inits, intercalate,
genericReplicate, genericSplitAt, genericTake, inits, intercalate,
intersperse, isPrefixOf, iterate, permutations, repeat, replicate, reverse, scanl,
scanr, sort, sortBy, sortOn, splitAt, subsequences, tails, take, takeWhile,
transpose, unfoldr, unzip, unzip3, zip, zip3, zipWith, (++))
import Data.List.NonEmpty (NonEmpty (..), head, init, last, nonEmpty, tail)
import Data.List.NonEmpty (NonEmpty (..), group, groupAllWith, groupBy, groupWith, head, init, last, nonEmpty, tail)

import GHC.Exts (sortWith)

0 comments on commit 4396fa9

Please sign in to comment.