Safe Haskell | None |
---|---|
Language | Haskell2010 |
Data.Set.Class
Contents
Description
Convenience operators overloaded for arbitrary use. There are no laws associated with these classes, just duck-typed so we don't have to use the qualified versions of each function.
Synopsis
- class HasUnion s where
- union :: s -> s -> s
- unions :: (Foldable f, Monoid (Union s)) => f s -> s
- unions1 :: (Foldable1 f, Semigroup (Union s)) => f s -> s
- newtype Union a = Union {
- unUnion :: a
- class HasIntersection s where
- intersection :: s -> s -> s
- intersections :: (Foldable f, Monoid (Intersection s)) => f s -> s
- intersections1 :: (Foldable1 f, Semigroup (Intersection s)) => f s -> s
- newtype Intersection a = Intersection {
- unIntersection :: a
- class HasDifference s where
- difference :: s -> s -> s
- (\\) :: HasDifference s => s -> s -> s
- class HasXUnion s where
- xunion :: s -> s -> s
- xunions :: (Foldable f, Monoid (XUnion s)) => f s -> s
- xunions1 :: (Foldable1 f, Semigroup (XUnion s)) => f s -> s
- newtype XUnion a = XUnion {
- unXUnion :: a
- class HasComplement s where
- complement :: s -> s
- class HasSingleton a s where
- singleton :: a -> s
- class HasSingletonWith k a s where
- singletonWith :: k -> a -> s
- class HasDelete a s where
- delete :: a -> s -> s
- class HasInsert a s where
- insert :: a -> s -> s
- class HasInsertWith k a s where
- insertWith :: k -> a -> s -> s
- class HasEmpty s where
- empty :: s
- class HasEmptyWith k s where
- emptyWith :: k -> s
- class HasTotal s where
- total :: s
- class HasTotalWith k s where
- totalWith :: k -> s
- class HasSize s where
- class CanBeSubset s where
- isSubsetOf :: s -> s -> Bool
- class CanBeProperSubset s where
- isProperSubsetOf :: s -> s -> Bool
- fromFoldable :: (Foldable f, HasInsert a s, HasEmpty s) => f a -> s
- fromFoldableWithKey :: (FoldableWithKey f, HasInsertWith (Key f) a s, HasEmpty s) => f a -> s
- fromFoldable1 :: (Foldable1 f, HasSingleton a s, Semigroup (Union s)) => f a -> s
- fromFoldable1WithKey :: (FoldableWithKey1 f, HasSingletonWith (Key f) a s, Semigroup (Union s)) => f a -> s
Union
class HasUnion s where Source #
Instances
HasUnion IntSet Source # | |
HasUnion (Predicate a) Source # | |
HasUnion (IntMap a) Source # | |
Ord a => HasUnion (Set a) Source # | |
(Hashable a, Eq a) => HasUnion (HashSet a) Source # | |
Ord a => HasUnion (OMSet a) Source # | |
Ord a => HasUnion (FiniteSet a) Source # | |
Eq a => HasUnion (UMSet a) Source # | |
Eq a => HasUnion (UUSet a) Source # | |
HasUnion a => HasUnion (XUnion a) Source # | |
HasUnion a => HasUnion (Intersection a) Source # | |
Defined in Data.Set.Class Methods union :: Intersection a -> Intersection a -> Intersection a Source # | |
HasUnion a => HasUnion (Union a) Source # | |
(Hashable k, Eq k) => HasUnion (HashMap k a) Source # | |
Ord k => HasUnion (Map k a) Source # | |
Ord k => HasUnion (SetWith k a) Source # | |
(Ord k, HasUnion (c a)) => HasUnion (SetsWith k c a) Source # | |
Instances
Intersection
class HasIntersection s where Source #
Methods
intersection :: s -> s -> s Source #
Instances
intersections :: (Foldable f, Monoid (Intersection s)) => f s -> s Source #
intersections1 :: (Foldable1 f, Semigroup (Intersection s)) => f s -> s Source #
newtype Intersection a Source #
Constructors
Intersection | |
Fields
|
Instances
Difference
class HasDifference s where Source #
Methods
difference :: s -> s -> s Source #
Instances
(\\) :: HasDifference s => s -> s -> s Source #
Exclusive Union / Symmetric Difference
class HasXUnion s where Source #
Instances
(HasUnion s, HasIntersection s, HasDifference s) => HasXUnion s Source # | |
Defined in Data.Set.Class |
Instances
Complement
class HasComplement s where Source #
Methods
complement :: s -> s Source #
Instances
HasComplement (Predicate a) Source # | |
Defined in Data.Set.Class Methods complement :: Predicate a -> Predicate a Source # | |
Ord a => HasComplement (FiniteSet a) Source # | |
Defined in Data.Set.Class Methods complement :: FiniteSet a -> FiniteSet a Source # | |
HasComplement a => HasComplement (XUnion a) Source # | |
Defined in Data.Set.Class Methods complement :: XUnion a -> XUnion a Source # | |
HasComplement a => HasComplement (Intersection a) Source # | |
Defined in Data.Set.Class Methods complement :: Intersection a -> Intersection a Source # | |
HasComplement a => HasComplement (Union a) Source # | |
Defined in Data.Set.Class Methods complement :: Union a -> Union a Source # |
Per-Element
class HasSingleton a s where Source #
Instances
HasSingleton Key IntSet Source # | |
HasSingleton a (UUSet a) Source # | |
Defined in Data.Set.Class | |
HasSingleton a (UMSet a) Source # | |
Defined in Data.Set.Class | |
HasSingleton a (OMSet a) Source # | |
Defined in Data.Set.Class | |
Eq a => HasSingleton a (Predicate a) Source # | |
Defined in Data.Set.Class | |
Hashable a => HasSingleton a (HashSet a) Source # | |
Defined in Data.Set.Class | |
HasSingleton a (Seq a) Source # | |
Defined in Data.Set.Class | |
HasSingleton a (Vector a) Source # | |
Defined in Data.Set.Class | |
HasSingleton a [a] Source # | |
Defined in Data.Set.Class | |
HasSingleton a (Set a) Source # | |
Defined in Data.Set.Class | |
HasSingleton x a => HasSingleton x (XUnion a) Source # | |
Defined in Data.Set.Class | |
HasSingleton x a => HasSingleton x (Intersection a) Source # | |
Defined in Data.Set.Class Methods singleton :: x -> Intersection a Source # | |
HasSingleton x a => HasSingleton x (Union a) Source # | |
Defined in Data.Set.Class |
class HasSingletonWith k a s where Source #
Methods
singletonWith :: k -> a -> s Source #
Instances
class HasDelete a s where Source #
Instances
HasDelete Key IntSet Source # | |
Ord a => HasDelete a (FiniteSet a) Source # | |
Eq a => HasDelete a (UUSet a) Source # | |
Eq a => HasDelete a (UMSet a) Source # | |
Eq a => HasDelete a (OMSet a) Source # | |
Eq a => HasDelete a (Predicate a) Source # | |
(Hashable a, Eq a) => HasDelete a (HashSet a) Source # | |
Eq a => HasDelete a (Vector a) Source # | |
Eq a => HasDelete a [a] Source # | |
Defined in Data.Set.Class | |
Ord a => HasDelete a (Set a) Source # | |
HasDelete x a => HasDelete x (XUnion a) Source # | |
HasDelete x a => HasDelete x (Intersection a) Source # | |
Defined in Data.Set.Class Methods delete :: x -> Intersection a -> Intersection a Source # | |
HasDelete x a => HasDelete x (Union a) Source # | |
HasDelete Key (IntMap a) Source # | |
Ord k => HasDelete a (SetWith k a) Source # | |
(Hashable k, Eq k) => HasDelete k (HashMap k a) Source # | |
Ord k => HasDelete k (Map k a) Source # | |
(Ord k, Eq (c a), HasEmpty (c a), HasDelete a (c a)) => HasDelete a (SetsWith k c a) Source # | |
class HasInsert a s where Source #
Instances
HasInsert Key IntSet Source # | |
Ord a => HasInsert a (FiniteSet a) Source # | |
Eq a => HasInsert a (UUSet a) Source # | |
HasInsert a (UMSet a) Source # | |
Ord a => HasInsert a (OMSet a) Source # | |
Eq a => HasInsert a (Predicate a) Source # | |
(Hashable a, Eq a) => HasInsert a (HashSet a) Source # | |
HasInsert a (Vector a) Source # | |
HasInsert a [a] Source # | |
Defined in Data.Set.Class | |
Ord a => HasInsert a (Set a) Source # | |
HasInsert x a => HasInsert x (XUnion a) Source # | |
HasInsert x a => HasInsert x (Intersection a) Source # | |
Defined in Data.Set.Class Methods insert :: x -> Intersection a -> Intersection a Source # | |
HasInsert x a => HasInsert x (Union a) Source # | |
Ord k => HasInsert a (SetWith k a) Source # | |
(Ord k, HasUnion (c a), HasSingleton a (c a)) => HasInsert a (SetsWith k c a) Source # | |
class HasInsertWith k a s where Source #
Methods
insertWith :: k -> a -> s -> s Source #
Instances
HasInsertWith k x a => HasInsertWith k x (XUnion a) Source # | |
Defined in Data.Set.Class Methods insertWith :: k -> x -> XUnion a -> XUnion a Source # | |
HasInsertWith k x a => HasInsertWith k x (Intersection a) Source # | |
Defined in Data.Set.Class Methods insertWith :: k -> x -> Intersection a -> Intersection a Source # | |
HasInsertWith k x a => HasInsertWith k x (Union a) Source # | |
Defined in Data.Set.Class Methods insertWith :: k -> x -> Union a -> Union a Source # | |
HasInsertWith Key a (IntMap a) Source # | |
Defined in Data.Set.Class | |
(Hashable k, Eq k) => HasInsertWith k a (HashMap k a) Source # | |
Defined in Data.Set.Class Methods insertWith :: k -> a -> HashMap k a -> HashMap k a Source # | |
Ord k => HasInsertWith k a (Map k a) Source # | |
Defined in Data.Set.Class Methods insertWith :: k -> a -> Map k a -> Map k a Source # |
Top and Bottom Elements
class HasEmpty s where Source #
Instances
HasEmpty IntSet Source # | |
Defined in Data.Set.Class | |
HasEmpty [a] Source # | |
Defined in Data.Set.Class | |
HasEmpty (Predicate a) Source # | |
Defined in Data.Set.Class | |
HasEmpty (IntMap a) Source # | |
Defined in Data.Set.Class | |
HasEmpty (Seq a) Source # | |
Defined in Data.Set.Class | |
HasEmpty (Set a) Source # | |
Defined in Data.Set.Class | |
HasEmpty (HashSet a) Source # | |
Defined in Data.Set.Class | |
HasEmpty (Vector a) Source # | |
Defined in Data.Set.Class | |
HasEmpty (OMSet a) Source # | |
Defined in Data.Set.Class | |
HasEmpty (UMSet a) Source # | |
Defined in Data.Set.Class | |
HasEmpty (UUSet a) Source # | |
Defined in Data.Set.Class | |
HasEmpty a => HasEmpty (XUnion a) Source # | |
Defined in Data.Set.Class | |
HasEmpty a => HasEmpty (Intersection a) Source # | |
Defined in Data.Set.Class Methods empty :: Intersection a Source # | |
HasEmpty a => HasEmpty (Union a) Source # | |
Defined in Data.Set.Class | |
HasEmpty (HashMap k a) Source # | |
Defined in Data.Set.Class | |
HasEmpty (Map k a) Source # | |
Defined in Data.Set.Class |
class HasEmptyWith k s where Source #
Instances
HasEmptyWith k a => HasEmptyWith k (XUnion a) Source # | |
Defined in Data.Set.Class | |
HasEmptyWith k a => HasEmptyWith k (Intersection a) Source # | |
Defined in Data.Set.Class Methods emptyWith :: k -> Intersection a Source # | |
HasEmptyWith k a => HasEmptyWith k (Union a) Source # | |
Defined in Data.Set.Class | |
HasEmptyWith (Set a) (FiniteSet a) Source # | |
HasEmptyWith (a -> k) (SetWith k a) Source # | |
Defined in Data.Set.Class | |
HasEmptyWith (a -> k) (SetsWith k c a) Source # | |
Defined in Data.Set.Ordered.Many.With |
class HasTotal s where Source #
Instances
HasTotal (Predicate a) Source # | |
Defined in Data.Set.Class | |
HasTotal a => HasTotal (XUnion a) Source # | |
Defined in Data.Set.Class | |
HasTotal a => HasTotal (Intersection a) Source # | |
Defined in Data.Set.Class Methods total :: Intersection a Source # | |
HasTotal a => HasTotal (Union a) Source # | |
Defined in Data.Set.Class |
class HasTotalWith k s where Source #
Instances
HasTotalWith k a => HasTotalWith k (XUnion a) Source # | |
Defined in Data.Set.Class | |
HasTotalWith k a => HasTotalWith k (Intersection a) Source # | |
Defined in Data.Set.Class Methods totalWith :: k -> Intersection a Source # | |
HasTotalWith k a => HasTotalWith k (Union a) Source # | |
Defined in Data.Set.Class | |
HasTotalWith (FiniteSet a) (FiniteSet a) Source # | |
Size
class HasSize s where Source #
Instances
HasSize IntSet Source # | |
HasSize [a] Source # | |
Defined in Data.Set.Class | |
HasSize (IntMap a) Source # | |
HasSize (Seq a) Source # | |
HasSize (Set a) Source # | |
HasSize (HashSet a) Source # | |
HasSize (Vector a) Source # | |
HasSize (OMSet a) Source # | |
HasSize (FiniteSet a) Source # | |
HasSize (UMSet a) Source # | |
HasSize (UUSet a) Source # | |
HasSize a => HasSize (XUnion a) Source # | |
HasSize a => HasSize (Intersection a) Source # | |
Defined in Data.Set.Class Methods size :: Intersection a -> Int Source # | |
HasSize a => HasSize (Union a) Source # | |
HasSize (HashMap k a) Source # | |
HasSize (Map k a) Source # | |
HasSize (SetWith k a) Source # | |
HasSize (SetsWith k c a) Source # | |
Relation
class CanBeSubset s where Source #
Methods
isSubsetOf :: s -> s -> Bool Source #
Instances
class CanBeProperSubset s where Source #
Methods
isProperSubsetOf :: s -> s -> Bool Source #
Instances
Generic Builders
fromFoldableWithKey :: (FoldableWithKey f, HasInsertWith (Key f) a s, HasEmpty s) => f a -> s Source #
fromFoldable1 :: (Foldable1 f, HasSingleton a s, Semigroup (Union s)) => f a -> s Source #
fromFoldable1WithKey :: (FoldableWithKey1 f, HasSingletonWith (Key f) a s, Semigroup (Union s)) => f a -> s Source #