| Safe Haskell | None |
|---|---|
| Language | GHC2021 |
Test.Credit.Queue.Streams
Synopsis
- data Stream (m :: Type -> Type) a
- type SThunk (m :: Type -> Type) = Thunk m (SLazyCon m)
- data SLazyCon (m :: Type -> Type) a where
- smatch :: MonadInherit m => Stream m a -> (a -> Stream m a -> m b) -> m b -> m b
- credit :: MonadInherit m => Stream m a -> m ()
- evalone :: MonadInherit m => Stream m a -> m ()
- toList :: MonadLazy m => Stream m a -> m [a]
- ifIndirect :: Monad m => Stream m a -> (SThunk m (Stream m a) -> m ()) -> m ()
- test :: MonadInherit m => m ()
Documentation
data Stream (m :: Type -> Type) a Source #
Instances
| (MonadMemory m, MemoryCell m a) => MemoryCell m (Stream m a) Source # | |
Defined in Test.Credit.Queue.Streams Methods prettyCell :: Stream 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 (Stream m a1) | |
| SReverse :: forall (m :: Type -> Type) a1. Stream m a1 -> Stream m a1 -> SLazyCon m (Stream m a1) |
Instances
| MonadInherit m => HasStep (SLazyCon m :: Type -> Type) (m :: Type -> Type) Source # | |
Defined in Test.Credit.Queue.Streams | |
| (MonadMemory m, MemoryCell m a) => MemoryCell m (SLazyCon m a) Source # | |
Defined in Test.Credit.Queue.Streams Methods prettyCell :: SLazyCon m a -> m Memory Source # | |
Arguments
| :: MonadInherit m | |
| => Stream m a | Scrutinee |
| -> (a -> Stream m a -> m b) | Cons case |
| -> m b | Nil case |
| -> m b |
Smart destructor for streams, consuming one credit
credit :: MonadInherit m => Stream m a -> m () Source #
evalone :: MonadInherit m => Stream m a -> m () Source #
test :: MonadInherit m => m () Source #