plutus-core-1.0.0.1: Language library for Plutus Core
Safe Haskell None
Language Haskell2010

PlutusCore.Quote

Synopsis

Documentation

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

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 .

freshName :: MonadQuote m => Text -> m Name Source #

Get a fresh Name , given the annotation and the Text name.

freshTyName :: MonadQuote m => Text -> m TyName Source #

Get a fresh TyName , given the annotation and the Text name.

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

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

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

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

newtype QuoteT m a Source #

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

Instances

Instances details
MonadTrans QuoteT Source #
Instance details

Defined in PlutusCore.Quote

Methods

lift :: Monad m => m a -> QuoteT m a Source #

MonadReader r m => MonadReader r ( QuoteT m) Source #
Instance details

Defined in PlutusCore.Quote

MonadState s m => MonadState s ( QuoteT m) Source #
Instance details

Defined in PlutusCore.Quote

MonadError e m => MonadError e ( QuoteT m) Source #
Instance details

Defined in PlutusCore.Quote

MonadWriter w m => MonadWriter w ( QuoteT m) Source #
Instance details

Defined in PlutusCore.Quote

Monad m => Monad ( QuoteT m) Source #
Instance details

Defined in PlutusCore.Quote

Functor m => Functor ( QuoteT m) Source #
Instance details

Defined in PlutusCore.Quote

Methods

fmap :: (a -> b) -> QuoteT m a -> QuoteT m b Source #

(<$) :: a -> QuoteT m b -> QuoteT m a Source #

Monad m => Applicative ( QuoteT m) Source #
Instance details

Defined in PlutusCore.Quote

MonadIO m => MonadIO ( QuoteT m) Source #
Instance details

Defined in PlutusCore.Quote

Monad m => MonadQuote ( QuoteT m) Source #
Instance details

Defined in PlutusCore.Quote

MFunctor QuoteT Source #
Instance details

Defined in PlutusCore.Quote

Methods

hoist :: forall m n (b :: k). Monad m => ( forall a. m a -> n a) -> QuoteT m b -> QuoteT n b Source #

type Quote = QuoteT Identity Source #

A non-transformer version of QuoteT .

class Monad m => MonadQuote m Source #

A monad that allows lifting of quoted expressions.

Instances

Instances details
MonadQuote m => MonadQuote ( MaybeT m) Source #
Instance details

Defined in PlutusCore.Quote

MonadQuote m => MonadQuote ( PropertyT m) Source #
Instance details

Defined in PlutusCore.Quote

MonadQuote m => MonadQuote ( GenT m) Source #
Instance details

Defined in PlutusCore.Quote

Monad m => MonadQuote ( QuoteT m) Source #
Instance details

Defined in PlutusCore.Quote

MonadQuote m => MonadQuote ( ReaderT r m) Source #
Instance details

Defined in PlutusCore.Quote

MonadQuote m => MonadQuote ( StateT s m) Source #
Instance details

Defined in PlutusCore.Quote

MonadQuote m => MonadQuote ( ExceptT e m) Source #
Instance details

Defined in PlutusCore.Quote

MonadQuote m => MonadQuote ( RenameT ren m) Source #
Instance details

Defined in PlutusCore.Rename.Monad

( Stream s, MonadQuote m) => MonadQuote ( ParsecT e s m) Source #
Instance details

Defined in PlutusCore.Parser.ParserCommon

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

Defined in PlutusCore.Normalize.Internal

Methods

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

MonadQuote m => MonadQuote ( DefT key uni fun ann m) Source #
Instance details

Defined in PlutusIR.Compiler.Definitions

Methods

liftQuote :: Quote a -> DefT key uni fun ann m a Source #

type FreshState = Unique Source #

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

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

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

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

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

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

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