creditmonad-1.1.0: Reasoning about amortized time complexity
Safe HaskellNone
LanguageGHC2021

Test.Credit.Queue.Streams

Documentation

type Stream (m :: Type -> Type) a = Thunk m (SLazyCon m) (StreamCell m a) Source #

data StreamCell (m :: Type -> Type) a Source #

Constructors

SCons a (Stream m a) 
SNil 

Instances

Instances details
(MonadMemory m, MemoryCell m a) => MemoryCell m (StreamCell m a) Source # 
Instance details

Defined in Test.Credit.Queue.Streams

Methods

prettyCell :: StreamCell m a -> m Memory Source #

data SLazyCon (m :: Type -> Type) a where Source #

Constructors

SAppend :: forall (m :: Type -> Type) a1. Stream m a1 -> Stream m a1 -> SLazyCon m (StreamCell m a1) 
SReverse :: forall (m :: Type -> Type) a1. Stream m a1 -> Stream m a1 -> SLazyCon m (StreamCell m a1) 

Instances

Instances details
MonadInherit m => HasStep (SLazyCon m :: Type -> Type) (m :: Type -> Type) Source # 
Instance details

Defined in Test.Credit.Queue.Streams

Methods

step :: SLazyCon m a -> m a Source #

(MonadMemory m, MemoryCell m a) => MemoryCell m (SLazyCon m a) Source # 
Instance details

Defined in Test.Credit.Queue.Streams

Methods

prettyCell :: SLazyCon m a -> m Memory Source #

cons :: MonadLazy m => a -> Stream m a -> m (Stream m a) Source #

nil :: MonadLazy m => m (Stream m a) Source #

slength :: MonadLazy m => Stream m a -> m Int Source #

toList :: MonadLazy m => Stream m a -> m [a] Source #

test :: MonadInherit m => m () Source #