clash-prelude-hedgehog-1.9.0: Hedgehog Generators for clash-prelude
Copyright(C) 2021-2024 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 :: forall m n. (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 Source #

show :: SomeBitVector atLeast -> String Source #

showList :: [SomeBitVector atLeast] -> ShowS Source #

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