Copyright | (C) 2021 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 :: (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 :: (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 |
genSomeBitVector :: forall m atLeast. (MonadGen m, KnownNat atLeast) => Range Natural -> (forall n. KnownNat n => m (BitVector n)) -> m (SomeBitVector atLeast) Source #