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

PlutusCore.Quote

Synopsis

Documentation

runQuoteT :: Monad m => QuoteT m a -> m a #

Run a quote from an empty identifier state. Note that the resulting term cannot necessarily be safely combined with other terms - that should happen inside QuoteT.

runQuote :: Quote a -> a #

freshUnique :: MonadQuote m => m Unique #

Get a fresh Unique.

freshName :: MonadQuote m => Text name.

freshenName :: MonadQuote m => Name -> m Name #

Make a copy of the given Name that is distinct from the old one.

freshenTyName :: MonadQuote m => TyName -> m TyName #

Make a copy of the given TyName that is distinct from the old one.

newtype QuoteT m a #

The "quotation" monad transformer. Within this monad you can do safe construction of PLC terms using quasiquotation, fresh-name generation, and parsing.

Constructors

QuoteT 

Fields

MonadQuote m => MonadQuote (NormalizeTypeT m tyname uni ann) # 
Instance details

Defined in PlutusCore.Normalize.Internal

Methods

liftQuote :: Quote a -> NormalizeTypeT m tyname uni ann a #

MonadQuote m => MonadQuote (SimplifierT name uni fun ann m) # 
Instance details

Defined in UntypedPlutusCore.Transform.Simplifier

Methods

liftQuote :: Quote a -> SimplifierT name uni fun ann m a #

type FreshState = Unique #

The state contains the "next" Unique that should be used for a name

liftQuote :: MonadQuote m => Quote a -> m a #

markNonFreshBelow :: MonadQuote m => Unique -> m () #

Mark all Uniques less than the given Unique as used, so they will not be generated in future.

markNonFresh :: MonadQuote m => Unique -> m () #

Mark a given Unique (and implicitly all Uniques less than it) as used, so they will not be generated in future.

markNonFreshMax :: MonadQuote m => Set Unique -> m () #

Mark the maximal Unique from a set of Uniques (and implicitly all Uniques less than it) as used, so they will not be generated in future.