type-indexed-queues-0.1.0.0: Queues with verified and unverified versions.

Safe HaskellNone
LanguageHaskell2010

Data.Queue.WithDict

Description

Provides a wrapper for queues, allowing them to conform to Foldable.

Synopsis

Documentation

data WithDict f a where Source #

This stores the dictionary of methods for the priority queue of f, allowing the entire type to conform to Foldable.

Constructors

WithDict :: Queue f a => f a -> WithDict f a 

Instances

Foldable (WithDict f) Source # 

Methods

fold :: Monoid m => WithDict f m -> m #

foldMap :: Monoid m => (a -> m) -> WithDict f a -> m #

foldr :: (a -> b -> b) -> b -> WithDict f a -> b #

foldr' :: (a -> b -> b) -> b -> WithDict f a -> b #

foldl :: (b -> a -> b) -> b -> WithDict f a -> b #

foldl' :: (b -> a -> b) -> b -> WithDict f a -> b #

foldr1 :: (a -> a -> a) -> WithDict f a -> a #

foldl1 :: (a -> a -> a) -> WithDict f a -> a #

toList :: WithDict f a -> [a] #

null :: WithDict f a -> Bool #

length :: WithDict f a -> Int #

elem :: Eq a => a -> WithDict f a -> Bool #

maximum :: Ord a => WithDict f a -> a #

minimum :: Ord a => WithDict f a -> a #

sum :: Num a => WithDict f a -> a #

product :: Num a => WithDict f a -> a #

MeldableQueue f a => MeldableQueue (WithDict f) a Source # 

Methods

merge :: WithDict f a -> WithDict f a -> WithDict f a Source #

fromFoldable :: Foldable f => f a -> WithDict f a Source #

Queue f a => Queue (WithDict f) a Source # 

Methods

minView :: WithDict f a -> Maybe (a, WithDict f a) Source #

insert :: a -> WithDict f a -> WithDict f a Source #

empty :: WithDict f a Source #

singleton :: a -> WithDict f a Source #

toList :: WithDict f a -> [a] Source #

fromList :: [a] -> WithDict f a Source #

heapSort :: p (WithDict f) -> [a] -> [a] Source #

(Eq a, Queue f a) => Eq (WithDict f a) Source # 

Methods

(==) :: WithDict f a -> WithDict f a -> Bool #

(/=) :: WithDict f a -> WithDict f a -> Bool #

(Data a, Data (f a), Typeable (* -> *) f, Queue f a) => Data (WithDict f a) Source # 

Methods

gfoldl :: (forall d b. Data d => c (d -> b) -> d -> c b) -> (forall g. g -> c g) -> WithDict f a -> c (WithDict f a) #

gunfold :: (forall b r. Data b => c (b -> r) -> c r) -> (forall r. r -> c r) -> Constr -> c (WithDict f a) #

toConstr :: WithDict f a -> Constr #

dataTypeOf :: WithDict f a -> DataType #

dataCast1 :: Typeable (* -> *) t => (forall d. Data d => c (t d)) -> Maybe (c (WithDict f a)) #

dataCast2 :: Typeable (* -> * -> *) t => (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c (WithDict f a)) #

gmapT :: (forall b. Data b => b -> b) -> WithDict f a -> WithDict f a #

gmapQl :: (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> WithDict f a -> r #

gmapQr :: (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> WithDict f a -> r #

gmapQ :: (forall d. Data d => d -> u) -> WithDict f a -> [u] #

gmapQi :: Int -> (forall d. Data d => d -> u) -> WithDict f a -> u #

gmapM :: Monad m => (forall d. Data d => d -> m d) -> WithDict f a -> m (WithDict f a) #

gmapMp :: MonadPlus m => (forall d. Data d => d -> m d) -> WithDict f a -> m (WithDict f a) #

gmapMo :: MonadPlus m => (forall d. Data d => d -> m d) -> WithDict f a -> m (WithDict f a) #

(Ord a, Queue f a) => Ord (WithDict f a) Source # 

Methods

compare :: WithDict f a -> WithDict f a -> Ordering #

(<) :: WithDict f a -> WithDict f a -> Bool #

(<=) :: WithDict f a -> WithDict f a -> Bool #

(>) :: WithDict f a -> WithDict f a -> Bool #

(>=) :: WithDict f a -> WithDict f a -> Bool #

max :: WithDict f a -> WithDict f a -> WithDict f a #

min :: WithDict f a -> WithDict f a -> WithDict f a #

(Read a, Queue f a) => Read (WithDict f a) Source # 
(Show a, Queue f a) => Show (WithDict f a) Source # 

Methods

showsPrec :: Int -> WithDict f a -> ShowS #

show :: WithDict f a -> String #

showList :: [WithDict f a] -> ShowS #

NFData (f a) => NFData (WithDict f a) Source # 

Methods

rnf :: WithDict f a -> () #