Safe Haskell | Safe-Inferred |
---|---|
Language | Haskell2010 |
This module defines the TypedBuiltinGen
type and functions of this type.
Synopsis
- data TermOf term a = TermOf {
- _termOfTerm ∷ term
- _termOfValue ∷ a
- type TypedBuiltinGenT term m = ∀ a. TypeRep a → GenT m (TermOf term a)
- type TypedBuiltinGen term = TypedBuiltinGenT term Identity
- genLowerBytes ∷ Monad m ⇒ Range Int → GenT m ByteString
- genTypedBuiltinFail ∷ Monad m ⇒ TypedBuiltinGenT term m
- genTypedBuiltinDef ∷ (HasConstantIn DefaultUni term, Monad m) ⇒ TypedBuiltinGenT term m
Documentation
A term
along with the corresponding Haskell value.
TermOf | |
|
Instances
(PrettyBy config a, PrettyBy config term) ⇒ PrettyBy config (TermOf term a) Source # | |
Foldable (TermOf term) Source # | |
Defined in PlutusCore.Generators.Hedgehog.TypedBuiltinGen fold ∷ Monoid m ⇒ TermOf term m → m Source # foldMap ∷ Monoid m ⇒ (a → m) → TermOf term a → m Source # foldMap' ∷ Monoid m ⇒ (a → m) → TermOf term a → m Source # foldr ∷ (a → b → b) → b → TermOf term a → b Source # foldr' ∷ (a → b → b) → b → TermOf term a → b Source # foldl ∷ (b → a → b) → b → TermOf term a → b Source # foldl' ∷ (b → a → b) → b → TermOf term a → b Source # foldr1 ∷ (a → a → a) → TermOf term a → a Source # foldl1 ∷ (a → a → a) → TermOf term a → a Source # toList ∷ TermOf term a → [a] Source # null ∷ TermOf term a → Bool Source # length ∷ TermOf term a → Int Source # elem ∷ Eq a ⇒ a → TermOf term a → Bool Source # maximum ∷ Ord a ⇒ TermOf term a → a Source # minimum ∷ Ord a ⇒ TermOf term a → a Source # | |
Traversable (TermOf term) Source # | |
Functor (TermOf term) Source # | |
type TypedBuiltinGenT term m = ∀ a. TypeRep a → GenT m (TermOf term a) Source #
A function of this type generates values of built-in typed (see TypedBuiltin
for
the list of such types) and returns it along with the corresponding PLC value.
type TypedBuiltinGen term = TypedBuiltinGenT term Identity Source #
TypedBuiltinGenT
specified to Identity
.
genLowerBytes ∷ Monad m ⇒ Range Int → GenT m ByteString Source #
Generate a UTF-8 lazy ByteString
containing lower-case letters.
genTypedBuiltinFail ∷ Monad m ⇒ TypedBuiltinGenT term m Source #
A built-ins generator that always fails.
genTypedBuiltinDef ∷ (HasConstantIn DefaultUni term, Monad m) ⇒ TypedBuiltinGenT term m Source #
A default built-ins generator.