clash-prelude-hedgehog-1.6.3: Hedgehog Generators for clash-prelude
Copyright(C) 2021-2022 QBayLogic B.V.
LicenseBSD2 (see the file LICENSE)
MaintainerQBayLogic B.V. <devops@qbaylogic.com>
Safe HaskellNone
LanguageHaskell2010

Clash.Hedgehog.Sized.BitVector

Description

Random generation of BitVector.

Synopsis

Documentation

genDefinedBit :: MonadGen m => m Bit Source #

Generate a bit which is guaranteed to be defined. This will either have the value low or high.

genBit :: MonadGen m => m Bit Source #

Generate a bit which is not guaranteed to be defined. This will either have the value low or high, or throw an XException.

genDefinedBitVector :: (MonadGen m, KnownNat n) => m (BitVector n) Source #

Generate a bit vector where all bits are defined.

genBitVector :: (MonadGen m, KnownNat n) => m (BitVector n) Source #

Generate a bit vector where some bits may be undefined.

data SomeBitVector atLeast where Source #

Constructors

SomeBitVector :: SNat n -> BitVector (atLeast + n) -> SomeBitVector atLeast 

Instances

Instances details
KnownNat atLeast => Show (SomeBitVector atLeast) Source # 
Instance details

Defined in Clash.Hedgehog.Sized.BitVector

Methods

showsPrec :: Int -> SomeBitVector atLeast -> ShowS #

show :: SomeBitVector atLeast -> String #

showList :: [SomeBitVector atLeast] -> ShowS #

genSomeBitVector :: forall m atLeast. (MonadGen m, KnownNat atLeast) => Range Natural -> (forall n. KnownNat n => m (BitVector n)) -> m (SomeBitVector atLeast) Source #