clash-lib-hedgehog-1.6.3: 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.DataCon

Description

Random type-directed generation of data constructors.

Synopsis

Documentation

genDataConsFrom Source #

Arguments

:: forall m. (Alternative m, MonadGen m) 
=> Range Int

The number of constructors to create for the data type

-> TyConMap

The types already in scope when defining this type

-> TyConName

The name of the AlgTyCon the constructors belong to

-> Kind

The kind of the AlgTyCon the constructors belong to

-> CoreGenT m [DataCon] 

Generate a list of data constructors for a type. This biases towards creating constructors which match some common form seen in code, such as simple enums with no fields, or records.