| Safe Haskell | None |
|---|---|
| Language | GHC2021 |
Protocols.ToConst
Description
Definitions for the ToConst protocol. Usable to pass constant values in
circuits.
Synopsis
- data ToConst a
- data ToConstBwd a
- to :: a -> Circuit () (ToConst a)
- from :: Circuit () (ToConst a) -> a
- toBwd :: a -> Circuit (ToConstBwd a) ()
- fromBwd :: Circuit (ToConstBwd a) () -> a
Documentation
Instances
| Protocol (ToConst a) # | |||||||||
Defined in Protocols.Plugin Associated Types
| |||||||||
| type Bwd (ToConst a) # | |||||||||
Defined in Protocols.Plugin | |||||||||
| type Fwd (ToConst a) # | |||||||||
Defined in Protocols.Plugin | |||||||||
data ToConstBwd a #
Instances
| Protocol (ToConstBwd a) # | |||||||||
Defined in Protocols.Plugin Associated Types
| |||||||||
| type Bwd (ToConstBwd a) # | |||||||||
Defined in Protocols.Plugin | |||||||||
| type Fwd (ToConstBwd a) # | |||||||||
Defined in Protocols.Plugin | |||||||||
to :: a -> Circuit () (ToConst a) Source #
Convert a value to a Circuit that produces a constant value on the forward channel.
toBwd :: a -> Circuit (ToConstBwd a) () Source #
Convert a value to a Circuit that produces a constant value in the
backward direction.
fromBwd :: Circuit (ToConstBwd a) () -> a Source #
Extract the constant value from the backward direction.