| Copyright | (C) 2019 Myrtle Software Ltd. 2018 @blaxill 2018 QBayLogic B.V. |
|---|---|
| License | BSD2 (see the file LICENSE) |
| Maintainer | Christiaan Baaij <christiaan.baaij@gmail.com> |
| Safe Haskell | Safe-Inferred |
| Language | Haskell2010 |
Clash.Signal.Delayed.Bundle
Description
Synopsis
- class Bundle a where
- data EmptyTuple = EmptyTuple
- data TaggedEmptyTuple (dom :: Domain) (d :: Nat) = TaggedEmptyTuple
Documentation
Isomorphism between a DSignal of a product type
(e.g. a tuple) and a product type of DSignals.
Instances of Bundle must satisfy the following laws:
bundle.unbundle=idunbundle.bundle=id
By default, bundle and unbundle, are defined as the identity, that is,
writing:
data D = A | B instance Bundle D
is the same as:
data D = A | B instance Bundle D where typeUnbundleddom delay D =DSignaldom delay Dbundles = sunbundles = s
Minimal complete definition
Nothing
Methods
bundle :: Unbundled dom d a -> DSignal dom d a Source #
Example:
bundle :: (DSignaldom d a,DSignaldom d b) ->DSignaldom d (a,b)
However:
bundle ::DSignaldomBit->DSignaldomBit
default bundle :: DSignal dom d a ~ Unbundled dom d a => Unbundled dom d a -> DSignal dom d a Source #
Instances
Tools to emulate pre Clash 1.0 Bundle () instance
data EmptyTuple Source #
See TaggedEmptyTuple
Constructors
| EmptyTuple |
Instances
| Bundle EmptyTuple Source # | See commit 94b0bff5
and documentation for |
Defined in Clash.Signal.Bundle Associated Types type Unbundled dom EmptyTuple = (res :: Type) Source # Methods bundle :: forall (dom :: Domain). Unbundled dom EmptyTuple -> Signal dom EmptyTuple Source # unbundle :: forall (dom :: Domain). Signal dom EmptyTuple -> Unbundled dom EmptyTuple Source # | |
| Bundle EmptyTuple Source # | See commit 94b0bff5
and documentation for |
Defined in Clash.Signal.Delayed.Bundle Associated Types type Unbundled dom d EmptyTuple = (res :: Type) Source # Methods bundle :: forall (dom :: Domain) (d :: Nat). Unbundled dom d EmptyTuple -> DSignal dom d EmptyTuple Source # unbundle :: forall (dom :: Domain) (d :: Nat). DSignal dom d EmptyTuple -> Unbundled dom d EmptyTuple Source # | |
| type Unbundled dom EmptyTuple Source # | |
Defined in Clash.Signal.Bundle | |
| type Unbundled dom d EmptyTuple Source # | |
Defined in Clash.Signal.Delayed.Bundle | |
data TaggedEmptyTuple (dom :: Domain) (d :: Nat) Source #
Same as TaggedEmptyTuple in Clash.Signal.Bundle, but adapted for DSignal.
Constructors
| TaggedEmptyTuple |