control-monad-queue-0.0.9: Resuable corecursive queues, via continuations.

Portabilityportable
Stabilityexperimental
Maintainerleon at melding-monads dot com

Control.Monad.Queue.Allison

Description

A library implementation of corecursive queues, see Circular Programs and Self-Referential Structures by Lloyd Allison, Software Practice and Experience, 19(2), pp.99-109, Feb 1989

http://www.csse.monash.edu.au/~lloyd/tildeFP/1989SPE/

For an explanation of the library implementation, see Lloyd Allison's Corecursive Queue: Why Continuations Matter by Leon P Smith, in The Monad Reader issue 14.

Documentation

data Q e a Source

Instances

MonadQueue e (Q e) 
Monad (Q e) 

enQ :: e -> Q e ()Source

peekQn :: Integral index => index -> Q e (Maybe e)Source

peekQs :: Integral len => len -> Q e [e]Source

deQ :: Q e (Maybe e)Source

deQs :: Integral len => len -> Q e [e]Source

lenQ :: Integral len => Q e lenSource

runQueue :: Q e a -> [e]Source

callCC :: ((a -> forall b. Q e b) -> Q e a) -> Q e aSource