clash-prelude-hedgehog-1.6.6: 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.Vector

Description

Random generation of vectors.

Synopsis

Documentation

genVec :: (MonadGen m, KnownNat n) => m a -> m (Vec n a) Source #

Generate a potentially empty vector, where each element is produced using the supplied generator. For a non-empty vector, see genNonEmptyVec.

genNonEmptyVec :: (MonadGen m, KnownNat n, 1 <= n) => m a -> m (Vec n a) Source #

Generate a non-empty vector, where each element is produced using the supplied generator. For a potentially empty vector, see genVec.

data SomeVec atLeast a where Source #

Constructors

SomeVec :: SNat n -> Vec (atLeast + n) a -> SomeVec atLeast a 

Instances

Instances details
(KnownNat atLeast, Show a) => Show (SomeVec atLeast a) Source # 
Instance details

Defined in Clash.Hedgehog.Sized.Vector

Methods

showsPrec :: Int -> SomeVec atLeast a -> ShowS #

show :: SomeVec atLeast a -> String #

showList :: [SomeVec atLeast a] -> ShowS #

genSomeVec :: (MonadGen m, KnownNat atLeast) => Range Natural -> m a -> m (SomeVec atLeast a) Source #