blarney-0.1.0.0
Copyright(c) Matthew Naylor 2019
LicenseMIT
Maintainermattfn@gmail.com
Stabilityexperimental
Safe HaskellSafe-Inferred
LanguageGHC2021

Blarney.Stream

Description

 
Synopsis

Documentation

type Stream a = Source a Source #

Stream interface

data Source t Source #

Source type. A Source t Interface returns values of type t via its $sel:peek:Source method and flow control through its $sel:canPeek:Source and $sel:consume:Source methods.

Constructors

Source 

Fields

Instances

Instances details
Functor Source # 
Instance details

Defined in Blarney.SourceSink

Methods

fmap :: (a -> b) -> Source a -> Source b #

(<$) :: a -> Source b -> Source a #

Generic (Source t) # 
Instance details

Defined in Blarney.SourceSink

Associated Types

type Rep (Source t) :: Type -> Type #

Methods

from :: Source t -> Rep (Source t) x #

to :: Rep (Source t) x -> Source t #

Interface t => Interface (Source t) # 
Instance details

Defined in Blarney.SourceSink

ToSource (Source t) t #

Identity conversion from Source to Source

Instance details

Defined in Blarney.SourceSink

Methods

toSource :: Source t -> Source t Source #

Connectable (Source t) (Sink t) #

Connectable instance for Source t and Sink t

Instance details

Defined in Blarney.SourceSink

Methods

makeConnection :: Source t -> Sink t -> Module () Source #

ToSP (SP t0 t1) t0 t1 #

ToSP instance for StreamProcessor itself

Instance details

Defined in Blarney.Stream

Methods

toSP :: SP t0 t1 -> SP t0 t1 Source #

ToSP (Sink t0, Source t1) t0 t1 #

ToSP instance for (Sink, Source) pairs

Instance details

Defined in Blarney.Stream

Methods

toSP :: (Sink t0, Source t1) -> SP t0 t1 Source #

type Rep (Source t) # 
Instance details

Defined in Blarney.SourceSink

type Rep (Source t) = D1 ('MetaData "Source" "Blarney.SourceSink" "blarney-0.1.0.0-inplace" 'False) (C1 ('MetaCons "Source" 'PrefixI 'True) (S1 ('MetaSel ('Just "canPeek") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (Bit 1)) :*: (S1 ('MetaSel ('Just "peek") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 t) :*: S1 ('MetaSel ('Just "consume") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (Action ())))))

toStream :: ToSource a b => a -> Stream b Source #

Convert to a Stream

nullStream :: Bits a => Stream a Source #

Null stream

guardStream :: (a -> Bit 1) -> Stream a -> Stream a Source #

Apply a guard to a stream

type SP t0 t1 = Stream t0 -> Module (Stream t1) Source #

StreamProcessor type

class ToSP a t0 t1 | a -> t0 t1 where Source #

Convert to a StreamProcessor

Methods

toSP :: a -> SP t0 t1 Source #

Instances

Instances details
ToSP (Queue a) a a #

ToSP instance for Queue

Instance details

Defined in Blarney.Queue

Methods

toSP :: Queue a -> SP a a Source #

ToSP (SP t0 t1) t0 t1 #

ToSP instance for StreamProcessor itself

Instance details

Defined in Blarney.Stream

Methods

toSP :: SP t0 t1 -> SP t0 t1 Source #

ToSP (Sink t0, Source t1) t0 t1 #

ToSP instance for (Sink, Source) pairs

Instance details

Defined in Blarney.Stream

Methods

toSP :: (Sink t0, Source t1) -> SP t0 t1 Source #