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 type-directed generation of data constructors.
Synopsis
- genDataConsFrom :: forall m. (Alternative m, MonadGen m) => Range Int -> TyConMap -> TyConName -> Kind -> CoreGenT m [DataCon]
Documentation
:: 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 |
-> Kind | The kind of the |
-> 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.