Copyright | (C) 2021-2022 QBayLogic B.V. |
---|---|
License | BSD2 (see the file LICENSE) |
Maintainer | QBayLogic B.V. <devops@qbaylogic.com> |
Safe Haskell | None |
Language | Haskell2010 |
Random generation of BitVector.
Synopsis
- genDefinedBit :: MonadGen m => m Bit
- genBit :: MonadGen m => m Bit
- genDefinedBitVector :: (MonadGen m, KnownNat n) => m (BitVector n)
- genBitVector :: forall m n. (MonadGen m, KnownNat n) => m (BitVector n)
- data SomeBitVector atLeast where
- SomeBitVector :: SNat n -> BitVector (atLeast + n) -> SomeBitVector atLeast
- genSomeBitVector :: forall m atLeast. (MonadGen m, KnownNat atLeast) => Range Natural -> (forall n. KnownNat n => m (BitVector n)) -> m (SomeBitVector atLeast)
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 #
SomeBitVector :: SNat n -> BitVector (atLeast + n) -> SomeBitVector atLeast |
Instances
KnownNat atLeast => Show (SomeBitVector atLeast) Source # | |
Defined in Clash.Hedgehog.Sized.BitVector 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 #