Safe Haskell | Trustworthy |
---|---|
Language | Haskell2010 |
- newtype Group a = Group {}
- class Grouping a where
- class Grouping1 f where
- nub :: Grouping a => [a] -> [a]
- nubWith :: Grouping b => (a -> b) -> [a] -> [a]
- group :: Grouping a => [a] -> [[a]]
- groupWith :: Grouping b => (a -> b) -> [a] -> [[a]]
- groupingEq :: Grouping a => a -> a -> Bool
- runGroup :: Group a -> [(a, b)] -> [[b]]
- hashing :: Hashable a => Group a
Documentation
Productive Stable Unordered Discriminator
class Grouping a where Source #
Eq
equipped with a compatible stable unordered discriminator.
Grouping Bool Source # | |
Grouping Char Source # | |
Grouping Int Source # | |
Grouping Int8 Source # | |
Grouping Int16 Source # | |
Grouping Int32 Source # | |
Grouping Int64 Source # | |
Grouping Word Source # | |
Grouping Word8 Source # | |
Grouping Word16 Source # | |
Grouping Word32 Source # | |
Grouping Word64 Source # | |
Grouping Void Source # | |
Grouping a => Grouping [a] Source # | |
Grouping a => Grouping (Maybe a) Source # | |
Grouping a => Grouping (Ratio a) Source # | |
Grouping a => Grouping (Complex a) Source # | |
(Grouping a, Grouping b) => Grouping (Either a b) Source # | |
(Grouping a, Grouping b) => Grouping (a, b) Source # | |
(Grouping a, Grouping b, Grouping c) => Grouping (a, b, c) Source # | |
(Grouping a, Grouping b, Grouping c, Grouping d) => Grouping (a, b, c, d) Source # | |
(Grouping1 f, Grouping1 g, Grouping a) => Grouping (Compose * * f g a) Source # | |
class Grouping1 f where Source #
grouping1 :: Group a -> Group (f a) Source #
grouping1 :: Deciding1 Grouping f => Group a -> Group (f a) Source #
Grouping1 [] Source # | |
Grouping1 Maybe Source # | |
Grouping1 Complex Source # | |
Grouping a => Grouping1 (Either a) Source # | |
Grouping a => Grouping1 ((,) a) Source # | |
(Grouping a, Grouping b) => Grouping1 ((,,) a b) Source # | |
(Grouping a, Grouping b, Grouping c) => Grouping1 ((,,,) a b c) Source # | |
(Grouping1 f, Grouping1 g) => Grouping1 (Compose * * f g) Source # | |
Combinators
groupWith :: Grouping b => (a -> b) -> [a] -> [[a]] Source #
O(n). This is a replacement for groupWith
using discrimination.
The result equivalence classes are not sorted, but the grouping is stable.