Copyright | (c) Alexandre Joannou 2019 |
---|---|
License | MIT |
Maintainer | alexandre.joannou@gmail.com |
Stability | experimental |
Safe Haskell | Safe-Inferred |
Language | GHC2021 |
Blarney.SourceSink
Description
Synopsis
- data Source t = Source {}
- data Sink t = Sink {}
- class ToSource a b | a -> b where
- class ToSink a b | a -> b where
- nullSource :: Bits t => Source t
- makeNullSource :: Bits t => Module (Source t)
- nullSink :: Sink t
- makeNullSink :: Module (Sink t)
- mapSource :: (a -> b) -> Source a -> Source b
- mapSink :: (b -> a) -> Sink a -> Sink b
- guardSource :: (a -> Bit 1) -> Source a -> Source a
- debugSource :: FShow t => Source t -> Format -> Source t
- debugSink :: FShow t => Sink t -> Format -> Sink t
Documentation
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
Functor Source # | |
Generic (Source t) # | |
Interface t => Interface (Source t) # | |
ToSource (Source t) t # | |
Connectable (Source t) (Sink t) # |
|
Defined in Blarney.SourceSink | |
ToSP (SP t0 t1) t0 t1 # | ToSP instance for StreamProcessor itself |
ToSP (Sink t0, Source t1) t0 t1 # | ToSP instance for (Sink, Source) pairs |
type Rep (Source t) # | |
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 ()))))) |
Sink
type. A Sink
t
Interface
can be fed values of type t
via its
$sel:put:Sink
method, expected to be called when its $sel:canPut:Sink
method returns
true
.
Constructors
Sink | |
Instances
Generic (Sink t) # | |
(Interface t, Bits t) => Interface (Sink t) # | |
ToSink (Sink t) t # | |
Connectable (Source t) (Sink t) # |
|
Defined in Blarney.SourceSink | |
ToSP (Sink t0, Source t1) t0 t1 # | ToSP instance for (Sink, Source) pairs |
type Rep (Sink t) # | |
Defined in Blarney.SourceSink type Rep (Sink t) = D1 ('MetaData "Sink" "Blarney.SourceSink" "blarney-0.1.0.0-inplace" 'False) (C1 ('MetaCons "Sink" 'PrefixI 'True) (S1 ('MetaSel ('Just "canPut") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (Bit 1)) :*: S1 ('MetaSel ('Just "put") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (t -> Action ())))) |