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

Clash.Hedgehog.Core.Var

Description

Random generation of core variables.

Synopsis

Documentation

genTyVar :: forall m. MonadGen m => Kind -> m TyName -> m TyVar Source #

Generate a fresh type variable of the specified kind.

genId :: forall m. MonadGen m => Type -> m TmName -> m Id Source #

Generate a fresh identifier of the specified kind.

genLocalId :: forall m. MonadGen m => Type -> m TmName -> m Id Source #

Generate a fresh local identifier of the specified kind.

genGlobalId :: forall m. MonadGen m => Type -> m TmName -> m Id Source #

Generate a fresh global identifier of the specified kind.

genVars :: forall m a. MonadGen m => (KindOrType -> m (Name a) -> m (Var a)) -> [KindOrType] -> m (Name a) -> m [Var a] Source #

Generate a collection of variables, from a supplied function to generate variables and the kinds / types of variables to generate.

TODO While this gives "unique" vars because the uniques are different, it can generate multiple vars with the same OccName.