| 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.
- class HasUnion s where
- 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
- 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
- (\\) :: HasDifference s => s -> s -> s
- class HasXUnion s where
- 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
- class HasSingleton a s where
- class HasSingletonWith k a s where
- class HasDelete a s where
- class HasInsert a s where
- class HasInsertWith k a s where
- class HasEmpty s where
- class HasEmptyWith k s where
- class HasTotal s where
- class HasTotalWith k s where
- class HasSize s where
- class CanBeSubset s where
- class CanBeProperSubset s where
- 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 #
Minimal complete definition
Instances
| HasUnion IntSet Source # | |
| HasUnion (IntMap a) Source # | |
| Ord a => HasUnion (Set 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 # | |
| (Hashable a, Eq a) => HasUnion (HashSet a) Source # | |
| HasUnion (Predicate a) Source # | |
| HasUnion a => HasUnion (XUnion a) Source # | |
| HasUnion a => HasUnion (Intersection a) Source # | |
| HasUnion a => HasUnion (Union a) Source # | |
| Ord k => HasUnion (Map k a) Source # | |
| Ord k => HasUnion (SetWith k a) Source # | |
| (Hashable k, Eq k) => HasUnion (HashMap k a) Source # | |
| (Ord k, HasUnion (c a)) => HasUnion (SetsWith k c a) Source # | |
Instances
Intersection
class HasIntersection s where Source #
Minimal complete definition
Methods
intersection :: s -> s -> s Source #
Instances
| HasIntersection IntSet Source # | |
| HasIntersection (IntMap a) Source # | |
| Ord a => HasIntersection (Set a) Source # | |
| Ord a => HasIntersection (OMSet a) Source # | |
| Ord a => HasIntersection (FiniteSet a) Source # | |
| Eq a => HasIntersection (UMSet a) Source # | |
| Eq a => HasIntersection (UUSet a) Source # | |
| (Hashable a, Eq a) => HasIntersection (HashSet a) Source # | |
| HasIntersection (Predicate a) Source # | |
| HasIntersection a => HasIntersection (XUnion a) Source # | |
| HasIntersection a => HasIntersection (Intersection a) Source # | |
| HasIntersection a => HasIntersection (Union a) Source # | |
| Ord k => HasIntersection (Map k a) Source # | |
| Ord k => HasIntersection (SetWith k a) Source # | |
| (Hashable k, Eq k) => HasIntersection (HashMap k a) Source # | |
| (Ord k, Eq (c a), HasEmpty (c a), HasIntersection (c a)) => HasIntersection (SetsWith k c a) Source # | |
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 #
Minimal complete definition
Methods
difference :: s -> s -> s Source #
Instances
| HasDifference IntSet Source # | |
| HasDifference (IntMap a) Source # | |
| Ord a => HasDifference (Set a) Source # | |
| Eq a => HasDifference (OMSet a) Source # | |
| Ord a => HasDifference (FiniteSet a) Source # | |
| Eq a => HasDifference (UMSet a) Source # | |
| Eq a => HasDifference (UUSet a) Source # | |
| (Hashable a, Eq a) => HasDifference (HashSet a) Source # | |
| HasDifference (Predicate a) Source # | |
| HasDifference a => HasDifference (XUnion a) Source # | |
| HasDifference a => HasDifference (Intersection a) Source # | |
| HasDifference a => HasDifference (Union a) Source # | |
| Ord k => HasDifference (Map k a) Source # | |
| Ord k => HasDifference (SetWith k a) Source # | |
| (Hashable k, Eq k) => HasDifference (HashMap k a) Source # | |
| (Ord k, Eq (c a), HasEmpty (c a), HasDifference (c a)) => HasDifference (SetsWith k c a) Source # | |
(\\) :: HasDifference s => s -> s -> s Source #
Exclusive Union / Symmetric Difference
class HasXUnion s where Source #
Minimal complete definition
Instances
| (HasUnion s, HasIntersection s, HasDifference s) => HasXUnion s Source # | |
Instances
Complement
class HasComplement s where Source #
Minimal complete definition
Methods
complement :: s -> s Source #
Instances
| Ord a => HasComplement (FiniteSet a) Source # | |
| HasComplement (Predicate a) Source # | |
| HasComplement a => HasComplement (XUnion a) Source # | |
| HasComplement a => HasComplement (Intersection a) Source # | |
| HasComplement a => HasComplement (Union a) Source # | |
Per-Element
class HasSingleton a s where Source #
Minimal complete definition
Instances
| HasSingleton Key IntSet Source # | |
| HasSingleton a (UUSet a) Source # | |
| HasSingleton a (UMSet a) Source # | |
| HasSingleton a (OMSet a) Source # | |
| Eq a => HasSingleton a (Predicate a) Source # | |
| Hashable a => HasSingleton a (HashSet a) Source # | |
| HasSingleton a (Seq a) Source # | |
| HasSingleton a [a] Source # | |
| HasSingleton a (Set a) Source # | |
| HasSingleton x a => HasSingleton x (XUnion a) Source # | |
| HasSingleton x a => HasSingleton x (Intersection a) Source # | |
| HasSingleton x a => HasSingleton x (Union a) Source # | |
class HasSingletonWith k a s where Source #
Minimal complete definition
Methods
singletonWith :: k -> a -> s Source #
Instances
| HasSingletonWith k x a => HasSingletonWith k x (XUnion a) Source # | |
| HasSingletonWith k x a => HasSingletonWith k x (Intersection a) Source # | |
| HasSingletonWith k x a => HasSingletonWith k x (Union a) Source # | |
| HasSingletonWith Key a (IntMap a) Source # | |
| Hashable k => HasSingletonWith k a (HashMap k a) Source # | |
| HasSingletonWith k a (Map k a) Source # | |
| HasSingletonWith (Set a) a (FiniteSet a) Source # | |
| Ord k => HasSingletonWith (a -> k) a (SetWith k a) Source # | |
| (Ord k, HasUnion (c a), HasSingleton a (c a)) => HasSingletonWith (a -> k) a (SetsWith k c a) Source # | |
class HasDelete a s where Source #
Minimal complete definition
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 [a] Source # | |
| Ord a => HasDelete a (Set a) Source # | |
| HasDelete x a => HasDelete x (XUnion a) Source # | |
| HasDelete x a => HasDelete x (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 #
Minimal complete definition
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 [a] Source # | |
| Ord a => HasInsert a (Set a) Source # | |
| HasInsert x a => HasInsert x (XUnion a) Source # | |
| HasInsert x a => HasInsert x (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 #
Minimal complete definition
Methods
insertWith :: k -> a -> s -> s Source #
Instances
| HasInsertWith k x a => HasInsertWith k x (XUnion a) Source # | |
| HasInsertWith k x a => HasInsertWith k x (Intersection a) Source # | |
| HasInsertWith k x a => HasInsertWith k x (Union a) Source # | |
| HasInsertWith Key a (IntMap a) Source # | |
| (Hashable k, Eq k) => HasInsertWith k a (HashMap k a) Source # | |
| Ord k => HasInsertWith k a (Map k a) Source # | |
Top and Bottom Elements
class HasEmpty s where Source #
Minimal complete definition
Instances
| HasEmpty IntSet Source # | |
| HasEmpty [a] Source # | |
| HasEmpty (Seq a) Source # | |
| HasEmpty (IntMap a) Source # | |
| HasEmpty (Set a) Source # | |
| HasEmpty (OMSet a) Source # | |
| HasEmpty (UMSet a) Source # | |
| HasEmpty (UUSet a) Source # | |
| HasEmpty (HashSet a) Source # | |
| HasEmpty (Predicate a) Source # | |
| HasEmpty a => HasEmpty (XUnion a) Source # | |
| HasEmpty a => HasEmpty (Intersection a) Source # | |
| HasEmpty a => HasEmpty (Union a) Source # | |
| HasEmpty (Map k a) Source # | |
| HasEmpty (HashMap k a) Source # | |
class HasEmptyWith k s where Source #
Minimal complete definition
Instances
| HasEmptyWith k a => HasEmptyWith k (XUnion a) Source # | |
| HasEmptyWith k a => HasEmptyWith k (Intersection a) Source # | |
| HasEmptyWith k a => HasEmptyWith k (Union a) Source # | |
| HasEmptyWith (Set a) (FiniteSet a) Source # | |
| HasEmptyWith (a -> k) (SetWith k a) Source # | |
| HasEmptyWith (a -> k) (SetsWith k c a) Source # | |
class HasTotalWith k s where Source #
Minimal complete definition
Instances
| HasTotalWith k a => HasTotalWith k (XUnion a) Source # | |
| HasTotalWith k a => HasTotalWith k (Intersection a) Source # | |
| HasTotalWith k a => HasTotalWith k (Union a) Source # | |
| HasTotalWith (FiniteSet a) (FiniteSet a) Source # | |
Size
class HasSize s where Source #
Minimal complete definition
Instances
| HasSize IntSet Source # | |
| HasSize [a] Source # | |
| HasSize (Seq a) Source # | |
| HasSize (IntMap a) Source # | |
| HasSize (Set a) Source # | |
| HasSize (OMSet a) Source # | |
| HasSize (FiniteSet a) Source # | |
| HasSize (UMSet a) Source # | |
| HasSize (UUSet a) Source # | |
| HasSize (HashSet a) Source # | |
| HasSize a => HasSize (XUnion a) Source # | |
| HasSize a => HasSize (Intersection a) Source # | |
| HasSize a => HasSize (Union a) Source # | |
| HasSize (Map k a) Source # | |
| HasSize (SetWith k a) Source # | |
| HasSize (HashMap k a) Source # | |
| HasSize (SetsWith k c a) Source # | |
Relation
class CanBeSubset s where Source #
Minimal complete definition
Methods
isSubsetOf :: s -> s -> Bool Source #
Instances
| CanBeSubset IntSet Source # | |
| Eq a => CanBeSubset (IntMap a) Source # | |
| Ord a => CanBeSubset (Set a) Source # | |
| Eq a => CanBeSubset (OMSet a) Source # | |
| Ord a => CanBeSubset (FiniteSet a) Source # | |
| Eq a => CanBeSubset (UMSet a) Source # | |
| Eq a => CanBeSubset (UUSet a) Source # | |
| CanBeSubset a => CanBeSubset (XUnion a) Source # | |
| CanBeSubset a => CanBeSubset (Intersection a) Source # | |
| CanBeSubset a => CanBeSubset (Union a) Source # | |
| (Eq k, Ord k, Eq a) => CanBeSubset (Map k a) Source # | |
| (Ord k, Eq a) => CanBeSubset (SetWith k a) Source # | |
| (Ord k, Eq (c a), CanBeSubset (c a)) => CanBeSubset (SetsWith k c a) Source # | |
class CanBeProperSubset s where Source #
Minimal complete definition
Methods
isProperSubsetOf :: s -> s -> Bool Source #
Instances
| CanBeProperSubset IntSet Source # | |
| Eq a => CanBeProperSubset (IntMap a) Source # | |
| Ord a => CanBeProperSubset (Set a) Source # | |
| Eq a => CanBeProperSubset (OMSet a) Source # | |
| Ord a => CanBeProperSubset (FiniteSet a) Source # | |
| Eq a => CanBeProperSubset (UMSet a) Source # | |
| Eq a => CanBeProperSubset (UUSet a) Source # | |
| CanBeProperSubset a => CanBeProperSubset (XUnion a) Source # | |
| CanBeProperSubset a => CanBeProperSubset (Intersection a) Source # | |
| CanBeProperSubset a => CanBeProperSubset (Union a) Source # | |
| (Eq k, Ord k, Eq a) => CanBeProperSubset (Map k a) Source # | |
| (Ord k, Eq a) => CanBeProperSubset (SetWith k a) Source # | |
| (Ord k, Eq (c a), CanBeSubset (c a)) => CanBeProperSubset (SetsWith k c a) Source # | |
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 #