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

PlutusCore.Generators.Hedgehog.AST

Synopsis

Documentation

simpleRecursiveMonadGen m ⇒ [m a] → [m a] → m a Source #

discardIfAnyConstantMonadGen m ⇒ (Some (ValueOf uni) → Bool) → m (Program tyname name uni fun ann) → m (Program tyname name uni fun ann) 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.

runAstGenMonadGen m ⇒ AstGen a → m a Source #

genNamesMonadGen 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 #