LambdaHack-0.6.1.0: A game engine library for roguelike dungeon crawlers

Safe HaskellNone
LanguageHaskell2010

Game.LambdaHack.Common.RingBuffer

Description

Ring buffers.

Synopsis

Documentation

data RingBuffer a Source #

Instances

Show a => Show (RingBuffer a) Source # 
Generic (RingBuffer a) Source # 

Associated Types

type Rep (RingBuffer a) :: * -> * #

Methods

from :: RingBuffer a -> Rep (RingBuffer a) x #

to :: Rep (RingBuffer a) x -> RingBuffer a #

Binary a => Binary (RingBuffer a) Source # 

Methods

put :: RingBuffer a -> Put #

get :: Get (RingBuffer a) #

putList :: [RingBuffer a] -> Put #

type Rep (RingBuffer a) Source # 
type Rep (RingBuffer a) = D1 * (MetaData "RingBuffer" "Game.LambdaHack.Common.RingBuffer" "LambdaHack-0.6.1.0-HURqEs4cFyW7LJywblRLqn" False) (C1 * (MetaCons "RingBuffer" PrefixI True) ((:*:) * ((:*:) * (S1 * (MetaSel (Just Symbol "rbCarrier") NoSourceUnpackedness SourceStrict DecidedStrict) (Rec0 * (Seq a))) (S1 * (MetaSel (Just Symbol "rbMaxSize") NoSourceUnpackedness SourceStrict DecidedStrict) (Rec0 * Int))) ((:*:) * (S1 * (MetaSel (Just Symbol "rbNext") NoSourceUnpackedness SourceStrict DecidedStrict) (Rec0 * Int)) (S1 * (MetaSel (Just Symbol "rbLength") NoSourceUnpackedness SourceStrict DecidedStrict) (Rec0 * Int)))))

empty :: Int -> a -> RingBuffer a Source #

cons :: a -> RingBuffer a -> RingBuffer a Source #

Add element to the front of the buffer.