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 core variables.
Synopsis
- genTyVar :: forall m. MonadGen m => Kind -> m TyName -> m TyVar
- genId :: forall m. MonadGen m => Type -> m TmName -> m Id
- genLocalId :: forall m. MonadGen m => Type -> m TmName -> m Id
- genGlobalId :: forall m. MonadGen m => Type -> m TmName -> m Id
- genVars :: forall m a. MonadGen m => (KindOrType -> m (Name a) -> m (Var a)) -> [KindOrType] -> m (Name a) -> m [Var a]
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.