plutus-core-1.30.0.0: Language library for Plutus Core
Safe HaskellSafe-Inferred
LanguageHaskell2010

PlutusCore.Generators.Hedgehog.AST

Synopsis

Documentation

simpleRecursive ∷ MonadGen m ⇒ [m a] → [m a] → m a Source #

type AstGen = GenT (Reader [Name]) Source #

The monad that generators run in. The environment is a list of names to choose from for generation of variables and binders.

runAstGen ∷ MonadGen m ⇒ AstGen a → m a Source #

genVersion ∷ MonadGen m ⇒ m Version Source #

genNames ∷ MonadGen m ⇒ m [Name] Source #

Generate a fixed set of names which we will use, of only up to a short size to make it likely that we get reuse. We do not attempt not to generate reserved words such as all or abs as the classic syntax parsers (both PLC and PIR ones) can handle names of variables clashing with reserved words. In the readable syntax that would be troubling, though, but we don't have a parser for that anyway.

genBuiltin ∷ (Bounded fun, Enum fun) ⇒ AstGen fun Source #

genTerm ∷ ∀ fun. (Bounded fun, Enum fun) ⇒ AstGen (Term TyName Name DefaultUni fun ()) Source #

genProgram ∷ ∀ fun. (Bounded fun, Enum fun) ⇒ AstGen (Program TyName Name DefaultUni fun ()) Source #