charon-0.1: Template
Safe HaskellSafe-Inferred
LanguageGHC2021

Charon.Data.UniqueSeqNE

Description

Provides the UniqueSeqNE type.

Synopsis

Documentation

data UniqueSeqNE a where Source #

Like UniqueSeq except carries the invariant that it is non-empty.

Bundled Patterns

pattern MkUniqueSeqNE :: NESeq a -> HashSet a -> UniqueSeqNE a 

Instances

Instances details
Foldable UniqueSeqNE Source # 
Instance details

Defined in Charon.Data.UniqueSeqNE.Internal

Methods

fold :: Monoid m => UniqueSeqNE m -> m #

foldMap :: Monoid m => (a -> m) -> UniqueSeqNE a -> m #

foldMap' :: Monoid m => (a -> m) -> UniqueSeqNE a -> m #

foldr :: (a -> b -> b) -> b -> UniqueSeqNE a -> b #

foldr' :: (a -> b -> b) -> b -> UniqueSeqNE a -> b #

foldl :: (b -> a -> b) -> b -> UniqueSeqNE a -> b #

foldl' :: (b -> a -> b) -> b -> UniqueSeqNE a -> b #

foldr1 :: (a -> a -> a) -> UniqueSeqNE a -> a #

foldl1 :: (a -> a -> a) -> UniqueSeqNE a -> a #

toList :: UniqueSeqNE a -> [a] #

null :: UniqueSeqNE a -> Bool #

length :: UniqueSeqNE a -> Int #

elem :: Eq a => a -> UniqueSeqNE a -> Bool #

maximum :: Ord a => UniqueSeqNE a -> a #

minimum :: Ord a => UniqueSeqNE a -> a #

sum :: Num a => UniqueSeqNE a -> a #

product :: Num a => UniqueSeqNE a -> a #

(k ~ A_Getter, b ~ NESeq a, c ~ NESeq a) => LabelOptic "seq" k (UniqueSeqNE a) (UniqueSeqNE a) b c Source # 
Instance details

Defined in Charon.Data.UniqueSeqNE.Internal

(k ~ A_Getter, b ~ HashSet a, c ~ HashSet a) => LabelOptic "set" k (UniqueSeqNE a) (UniqueSeqNE a) b c Source # 
Instance details

Defined in Charon.Data.UniqueSeqNE.Internal

Hashable a => Semigroup (UniqueSeqNE a) Source # 
Instance details

Defined in Charon.Data.UniqueSeqNE.Internal

Show a => Show (UniqueSeqNE a) Source # 
Instance details

Defined in Charon.Data.UniqueSeqNE.Internal

Eq a => Eq (UniqueSeqNE a) Source # 
Instance details

Defined in Charon.Data.UniqueSeqNE.Internal

Creation

Elimination

Lookup

(∈) :: Hashable a => a -> UniqueSeqNE a -> Bool infix 4 Source #

Operator alias for member. U+2216.

Since: 0.1

(∉) :: Hashable a => a -> UniqueSeqNE a -> Bool infix 4 Source #

Negation of (∈). U+2209

Since: 0.1

Operations

union :: forall a. Hashable a => UniqueSeqNE a -> UniqueSeqNE a -> UniqueSeqNE a Source #

(∪) :: Hashable a => UniqueSeqNE a -> UniqueSeqNE a -> UniqueSeqNE a infixl 6 Source #

Operator alias for union. U+222A.

Since: 0.1

(⋃) :: Hashable a => NonEmpty (UniqueSeqNE a) -> UniqueSeqNE a Source #

Fold over union. U+22C3.

Since: 0.1

map :: Hashable b => (a -> b) -> UniqueSeqNE a -> UniqueSeqNE b Source #

(↤) :: Hashable b => (a -> b) -> UniqueSeqNE a -> UniqueSeqNE b infix 3 Source #

Operator alias for map. U+21A4.

Since: 0.1

(↦) :: Hashable b => UniqueSeqNE a -> (a -> b) -> UniqueSeqNE b infix 3 Source #

Flipped (↤). U+21A6.

Since: 0.1

Display

display :: (a -> Text) -> UniqueSeqNE a -> Text Source #