Safe Haskell | Safe-Inferred |
---|---|
Language | Haskell2010 |
Synopsis
- class GenTypedTerm uni where
- genTypedTerm ∷ ∀ (a ∷ Type) fun. KnownTypeAst TyName uni a ⇒ TypeRep a → Gen (Term TyName Name uni fun ())
- class GenArbitraryTerm uni where
- genConstant ∷ ∀ (a ∷ Type). TypeRep a → SomeGen DefaultUni
Documentation
class GenTypedTerm uni where Source #
This class exists so we can provide an ad-hoc typed term generator for various universes. We usually rely-on a universe-specific generator for well-typed constants within that universe.
TODO: Move this to PlutusIR.Generators.AST, and merge genConstant
with
genConstant
.
genTypedTerm ∷ ∀ (a ∷ Type) fun. KnownTypeAst TyName uni a ⇒ TypeRep a → Gen (Term TyName Name uni fun ()) Source #
Generate a Term
in uni
with the given type.
Instances
GenTypedTerm DefaultUni Source # | |
Defined in PlutusCore.Generators.Hedgehog.Builtin genTypedTerm ∷ KnownTypeAst TyName DefaultUni a ⇒ TypeRep a → Gen (Term TyName Name DefaultUni fun ()) Source # |
class GenArbitraryTerm uni where Source #
This class exists so we can provide an ad-hoc arbitrary term generator for various universes.
genArbitraryTerm ∷ ∀ fun. (Bounded fun, Enum fun) ⇒ Gen (Term TyName Name uni fun ()) Source #
Generate an arbitrary Term
in uni
.
Instances
GenArbitraryTerm DefaultUni Source # | |
Defined in PlutusCore.Generators.Hedgehog.Builtin genArbitraryTerm ∷ (Bounded fun, Enum fun) ⇒ Gen (Term TyName Name DefaultUni fun ()) Source # |
genConstant ∷ ∀ (a ∷ Type). TypeRep a → SomeGen DefaultUni Source #