Cabal-3.10.3.0: A framework for packaging Haskell software
Safe HaskellNone
LanguageHaskell2010

Distribution.Utils.NubList

Synopsis

Documentation

data NubList a Source #

NubList : A de-duplicated list that maintains the original order.

Instances

Instances details
Structured a => Structured (NubList a) Source # 
Instance details

Defined in Distribution.Utils.NubList

Ord a => Monoid (NubList a) Source #

Monoid operations on NubLists. For a valid Monoid instance we need to satisfy the required monoid laws; identity, associativity and closure.

Identity : by inspection: mempty mappend NubList xs == NubList xs mappend mempty

Associativity : by inspection: (NubList xs mappend NubList ys) mappend NubList zs == NubList xs mappend (NubList ys mappend NubList zs)

Closure : appending two lists of type a and removing duplicates obviously does not change the type.

Instance details

Defined in Distribution.Utils.NubList

Ord a => Semigroup (NubList a) Source # 
Instance details

Defined in Distribution.Utils.NubList

Methods

(<>) :: NubList a -> NubList a -> NubList a Source #

sconcat :: NonEmpty (NubList a) -> NubList a Source #

stimes :: Integral b => b -> NubList a -> NubList a Source #

Generic (NubList a) Source # 
Instance details

Defined in Distribution.Utils.NubList

Associated Types

type Rep (NubList a) 
Instance details

Defined in Distribution.Utils.NubList

type Rep (NubList a) = D1 ('MetaData "NubList" "Distribution.Utils.NubList" "Cabal-3.10.3.0-ed99" 'True) (C1 ('MetaCons "NubList" 'PrefixI 'True) (S1 ('MetaSel ('Just "fromNubList") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 [a])))

Methods

from :: NubList a -> Rep (NubList a) x Source #

to :: Rep (NubList a) x -> NubList a Source #

(Ord a, Read a) => Read (NubList a) Source # 
Instance details

Defined in Distribution.Utils.NubList

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

Defined in Distribution.Utils.NubList

(Ord a, Binary a) => Binary (NubList a) Source #

Binary instance for 'NubList a' is the same as for '[a]'. For put, we just pull off constructor and put the list. For get, we get the list and make a NubList out of it using toNubList.

Instance details

Defined in Distribution.Utils.NubList

Methods

put :: NubList a -> Put #

get :: Get (NubList a) #

putList :: [NubList a] -> Put #

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

Defined in Distribution.Utils.NubList

Methods

(==) :: NubList a -> NubList a -> Bool #

(/=) :: NubList a -> NubList a -> Bool #

type Rep (NubList a) Source # 
Instance details

Defined in Distribution.Utils.NubList

type Rep (NubList a) = D1 ('MetaData "NubList" "Distribution.Utils.NubList" "Cabal-3.10.3.0-ed99" 'True) (C1 ('MetaCons "NubList" 'PrefixI 'True) (S1 ('MetaSel ('Just "fromNubList") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 [a])))

toNubList :: Ord a => [a] -> NubList a Source #

Smart constructor for the NubList type.

overNubList :: Ord a => ([a] -> [a]) -> NubList a -> NubList a Source #

Lift a function over lists to a function over NubLists.

data NubListR a Source #

NubListR : A right-biased version of NubList. That is toNubListR ["-XNoFoo", "-XFoo", "-XNoFoo"] will result in ["-XFoo", "-XNoFoo"], unlike the normal NubList, which is left-biased. Built on top of ordNubRight and listUnionRight.

Instances

Instances details
Ord a => Monoid (NubListR a) Source # 
Instance details

Defined in Distribution.Utils.NubList

Ord a => Semigroup (NubListR a) Source # 
Instance details

Defined in Distribution.Utils.NubList

(Ord a, Read a) => Read (NubListR a) Source # 
Instance details

Defined in Distribution.Utils.NubList

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

Defined in Distribution.Utils.NubList

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

Defined in Distribution.Utils.NubList

Methods

(==) :: NubListR a -> NubListR a -> Bool #

(/=) :: NubListR a -> NubListR a -> Bool #

toNubListR :: Ord a => [a] -> NubListR a Source #

Smart constructor for the NubListR type.

overNubListR :: Ord a => ([a] -> [a]) -> NubListR a -> NubListR a Source #

Lift a function over lists to a function over NubListRs.