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

Safe HaskellSafe
LanguageHaskell2010

Data.Queue.Indexed.Skew

Description

Size-indexed skew heaps.

Synopsis

Documentation

data Skew n a where Source #

A size-indexed skew heap.

Constructors

Empty :: Skew 0 a 
Node :: a -> Skew n a -> Skew m a -> Skew ((1 + n) + m) a 

Instances

Ord a => MeldableIndexedQueue Skew a Source # 

Methods

merge :: Skew n a -> Skew m a -> Skew (n + m) a Source #

Ord a => IndexedQueue Skew a Source # 

Methods

empty :: Skew 0 a Source #

minView :: Skew (1 + n) a -> (a, Skew n a) Source #

singleton :: a -> Skew 1 a Source #

insert :: a -> Skew n a -> Skew (1 + n) a Source #

minViewMay :: Skew n a -> ((Nat ~ n) 0 -> b) -> (forall m. (Nat ~ (1 + m)) n => a -> Skew m a -> b) -> b Source #

NFData a => NFData (Skew n a) Source # 

Methods

rnf :: Skew n a -> () #