clash-lib-hedgehog-1.5.0: Hedgehog Generators for clash-lib
Copyright (C) 2021 QBayLogic B.V. BSD2 (see the file LICENSE) QBayLogic B.V. None Haskell2010

Clash.Hedgehog.Core.DataCon

Description

Random type-directed generation of data constructors.

Synopsis

# Documentation

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.