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 | None |
Language | Haskell2010 |
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 DSignal
s.
Instances of Bundle
must satisfy the following laws:
bundle
.unbundle
=id
unbundle
.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 typeUnbundled
dom delay D =DSignal
dom delay Dbundle
s = sunbundle
s = s
Nothing
bundle :: Unbundled dom d a -> DSignal dom d a Source #
Example:
bundle :: (DSignal
dom d a,DSignal
dom d b) ->DSignal
dom d (a,b)
However:
bundle ::DSignal
domBit
->DSignal
domBit
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
Instances
Bundle EmptyTuple Source # | See commit 94b0bff5
and documentation for |
Defined in Clash.Signal.Bundle type Unbundled dom EmptyTuple = (res :: Type) Source # 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 type Unbundled dom d EmptyTuple = (res :: Type) Source # 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
.