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

Safe HaskellSafe
LanguageHaskell2010

Data.Queue.Indexed.Splay

Description

Size-indexed splay heaps.

Synopsis

Documentation

data Splay n a where Source #

A size-indexed splay heap. Based on this.

Constructors

Leaf :: Splay 0 a 
Node :: a -> !(Splay n a) -> !(Splay m a) -> Splay ((1 + n) + m) a 

Instances

Ord a => MeldableIndexedQueue Splay a Source # 

Methods

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

Ord a => IndexedQueue Splay a Source # 

Methods

empty :: Splay 0 a Source #

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

singleton :: a -> Splay 1 a Source #

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

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

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

Methods

rnf :: Splay n a -> () #