Distribution.Compat.NonEmptySet

Cabal-syntax-3.12.0.0: A library for working with .cabal files

Safe Haskell | None
Language | Haskell2010

Distribution.Compat.NonEmptySet

Contents

- Construction
- Insertion
- Deletion
- Conversions
- Query
- Map

Synopsis

- data NonEmptySet a
- singleton :: a -> NonEmptySet a
- insert :: Ord a => a -> NonEmptySet a -> NonEmptySet a
- delete :: Ord a => a -> NonEmptySet a -> Maybe (NonEmptySet a)
- toNonEmpty :: NonEmptySet a -> NonEmpty a
- fromNonEmpty :: Ord a => NonEmpty a -> NonEmptySet a
- toList :: NonEmptySet a -> [a]
- toSet :: NonEmptySet a -> Set a
- member :: Ord a => a -> NonEmptySet a -> Bool
- map :: Ord b => (a -> b) -> NonEmptySet a -> NonEmptySet b

# Documentation

data NonEmptySet a Source #

Since: Cabal-syntax-3.4.0.0

#### Instances

Instances details

Foldable NonEmptySet Source # |
Instance details Defined in Distribution.Compat.NonEmptySet Methods fold :: Monoid m => NonEmptySet m -> m # foldMap :: Monoid m => (a -> m) -> NonEmptySet a -> m # foldMap' :: Monoid m => (a -> m) -> NonEmptySet a -> m # foldr :: (a -> b -> b) -> b -> NonEmptySet a -> b # foldr' :: (a -> b -> b) -> b -> NonEmptySet a -> b # foldl :: (b -> a -> b) -> b -> NonEmptySet a -> b # foldl' :: (b -> a -> b) -> b -> NonEmptySet a -> b # foldr1 :: (a -> a -> a) -> NonEmptySet a -> a # foldl1 :: (a -> a -> a) -> NonEmptySet a -> a # toList :: NonEmptySet a -> [a] # null :: NonEmptySet a -> Bool # length :: NonEmptySet a -> Int # elem :: Eq a => a -> NonEmptySet a -> Bool # maximum :: Ord a => NonEmptySet a -> a # minimum :: Ord a => NonEmptySet a -> a # sum :: Num a => NonEmptySet a -> a # product :: Num a => NonEmptySet a -> a #
Structured a => Structured (NonEmptySet a) Source # |
Instance details Defined in Distribution.Compat.NonEmptySet Methods structure :: Proxy (NonEmptySet a) -> Structure Source # structureHash' :: Tagged (NonEmptySet a) MD5
Binary a => Binary (NonEmptySet a) Source # |
Instance details Defined in Distribution.Compat.NonEmptySet Methods put :: NonEmptySet a -> Put Source # get :: Get (NonEmptySet a) Source # putList :: [NonEmptySet a] -> Put Source #
NFData a => NFData (NonEmptySet a) Source # |
Instance details Defined in Distribution.Compat.NonEmptySet Methods rnf :: NonEmptySet a -> () Source #
Ord a => Semigroup (NonEmptySet a) Source # | Note: there aren't `Monoid` instance.
Instance details Defined in Distribution.Compat.NonEmptySet Methods (<>) :: NonEmptySet a -> NonEmptySet a -> NonEmptySet a # sconcat :: NonEmpty (NonEmptySet a) -> NonEmptySet a # stimes :: Integral b => b -> NonEmptySet a -> NonEmptySet a #
(Data a, Ord a) => Data (NonEmptySet a) Source # |
Instance details Defined in Distribution.Compat.NonEmptySet Methods gfoldl :: (forall d b. Data d => c (d -> b) -> d -> c b) -> (forall g. g -> c g) -> NonEmptySet a -> c (NonEmptySet a) # gunfold :: (forall b r. Data b => c (b -> r) -> c r) -> (forall r. r -> c r) -> Constr -> c (NonEmptySet a) # toConstr :: NonEmptySet a -> Constr # dataTypeOf :: NonEmptySet a -> DataType # dataCast1 :: Typeable t => (forall d. Data d => c (t d)) -> Maybe (c (NonEmptySet a)) # dataCast2 :: Typeable t => (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c (NonEmptySet a)) # gmapT :: (forall b. Data b => b -> b) -> NonEmptySet a -> NonEmptySet a # gmapQl :: (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> NonEmptySet a -> r # gmapQr :: forall r r'. (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> NonEmptySet a -> r # gmapQ :: (forall d. Data d => d -> u) -> NonEmptySet a -> [u] # gmapQi :: Int -> (forall d. Data d => d -> u) -> NonEmptySet a -> u # gmapM :: Monad m => (forall d. Data d => d -> m d) -> NonEmptySet a -> m (NonEmptySet a) # gmapMp :: MonadPlus m => (forall d. Data d => d -> m d) -> NonEmptySet a -> m (NonEmptySet a) # gmapMo :: MonadPlus m => (forall d. Data d => d -> m d) -> NonEmptySet a -> m (NonEmptySet a) #
(Read a, Ord a) => Read (NonEmptySet a) Source # |
Instance details Defined in Distribution.Compat.NonEmptySet Methods readsPrec :: Int -> ReadS (NonEmptySet a) # readList :: ReadS [NonEmptySet a] # readPrec :: ReadPrec (NonEmptySet a) # readListPrec :: ReadPrec [NonEmptySet a] #
Show a => Show (NonEmptySet a) Source # |
Instance details Defined in Distribution.Compat.NonEmptySet Methods showsPrec :: Int -> NonEmptySet a -> ShowS # show :: NonEmptySet a -> String # showList :: [NonEmptySet a] -> ShowS #
Eq a => Eq (NonEmptySet a) Source # |
Instance details Defined in Distribution.Compat.NonEmptySet Methods (==) :: NonEmptySet a -> NonEmptySet a -> Bool # (/=) :: NonEmptySet a -> NonEmptySet a -> Bool #
Ord a => Ord (NonEmptySet a) Source # |
Instance details Defined in Distribution.Compat.NonEmptySet Methods compare :: NonEmptySet a -> NonEmptySet a -> Ordering # (<) :: NonEmptySet a -> NonEmptySet a -> Bool # (<=) :: NonEmptySet a -> NonEmptySet a -> Bool # (>) :: NonEmptySet a -> NonEmptySet a -> Bool # (>=) :: NonEmptySet a -> NonEmptySet a -> Bool # max :: NonEmptySet a -> NonEmptySet a -> NonEmptySet a # min :: NonEmptySet a -> NonEmptySet a -> NonEmptySet a #

# Construction

singleton :: a -> NonEmptySet a Source #

# Insertion

insert :: Ord a => a -> NonEmptySet a -> NonEmptySet a Source #

# Deletion

delete :: Ord a => a -> NonEmptySet a -> Maybe (NonEmptySet a) Source #

# Conversions

toNonEmpty :: NonEmptySet a -> NonEmpty a Source #

fromNonEmpty :: Ord a => NonEmpty a -> NonEmptySet a Source #

toList :: NonEmptySet a -> [a] Source #

toSet :: NonEmptySet a -> Set a Source #

# Query

member :: Ord a => a -> NonEmptySet a -> Bool Source #

# Map

map :: Ord b => (a -> b) -> NonEmptySet a -> NonEmptySet b Source #