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 generation of names.
Synopsis
- genKindName :: forall m. MonadGen m => m KiName
- genTypeName :: forall m. MonadGen m => m TyName
- genTyConName :: forall m. MonadGen m => m TyConName
- genTermName :: forall m. MonadGen m => m TmName
- genDataConName :: forall m. MonadGen m => m DcName
- genVarName :: forall m a. MonadGen m => m (Name a)
- genFreshName :: forall m a b. MonadGen m => UniqSet b -> m (Name a) -> m (Name a)
- genNames :: forall m a. MonadGen m => Int -> m (Name a) -> m [Name a]
Documentation
genKindName :: forall m. MonadGen m => m KiName Source #
genTypeName :: forall m. MonadGen m => m TyName Source #
genTyConName :: forall m. MonadGen m => m TyConName Source #
genTermName :: forall m. MonadGen m => m TmName Source #
genDataConName :: forall m. MonadGen m => m DcName Source #
genVarName :: forall m a. MonadGen m => m (Name a) Source #
genFreshName :: forall m a b. MonadGen m => UniqSet b -> m (Name a) -> m (Name a) Source #
Generate a name using the given generator, while ensuring the unique of
the generated name does not occur in the given UniqSet
.
genNames :: forall m a. MonadGen m => Int -> m (Name a) -> m [Name a] Source #
Generate a collection of names, from a supplied function to generate names and the number of names to generate.
TODO While this gives "unique" names because the uniques are different, it can generate multiple names with the same OccName.