boombox-0.0: Chronokinetic stream sources and incremental consumers

Safe HaskellSafe
LanguageHaskell2010

Data.Boombox.Head

Synopsis

Documentation

data Head i a Source

Head is a Store-like comonad which handles seeking.

Constructors

Head !i (Maybe i -> a) 

seeksTape :: Monad m => (i -> Maybe i) -> Tape (Head i) m a -> Tape (Head i) m a Source

Seek to an arbitrary position.

posP :: PlayerT (Head i) s m i Source

Get the current offset.

seeksP :: (i -> Maybe i) -> PlayerT (Head i) s m () Source

Apply the given function to the current offset and jump to the resulting offset.

seekP :: i -> PlayerT (Head i) s m () Source

Seek to the given offset.